Ankith Reddy

Ankith Reddy

730 Articles Published

Articles by Ankith Reddy

Page 2 of 73

DoubleStream noneMatch() method in Java

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 155 Views

The noneMatch() method of the DoubleStream class returns true if none of the elements of this stream match the provided predicate.The syntax is as followsboolean noneMatch(DoublePredicate predicate)Here, predicate is a stateless predicate to apply to elements of this stream. To use the DoubleStream class in Java, import the following packageimport java.util.stream.DoubleStream;Create DoubleStream and add some elements to the streamDoubleStream doubleStream = DoubleStream.of(15.8, 28.7, 35.7, 48.1, 78.9);Now, TRUE is returned if none of the element match the conditionboolean res = doubleStream.noneMatch(num -> num > 90); The following is an example to implement DoubleStream noneMatch() method in JavaExampleimport java.util.*; import java.util.stream.DoubleStream; public ...

Read More

HTML DOM Anchor password Property

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 160 Views

The HTML DOM Anchor password property set or return the password part of the href attribute value. The password part is entered by the user. If you want to display it, then it can be seen after the username and before the hostname i.e. https −//username −password@www.demo.com.Following is the syntax to set the password property −anchorObj.password = passwordFollowing is the syntax to return the password property −anchorObj.passwordLet us now see an example to implement the DOM Anchor password property −Example Company Products Display password Display origin Display hreflang function display() { ...

Read More

IntStream rangeClosed() method in Java

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 1K+ Views

The rangeClosed() class in the IntStream class returns a sequential ordered IntStream from startInclusive to endInclusive by an incremental step of 1. This includes both the startInclusive and endInclusive values.The syntax is as followsstatic IntStream rangeClosed(int startInclusive, int endInclusive)Here, startInclusive is the value including the first value and endInclusive is the value indicating the last value. To work with the IntStream class in Java, import the following packageimport java.util.stream.IntStream;The following is an example to implement IntStream rangeClosed() method in JavaExampleimport java.util.stream.IntStream; public class Demo { public static void main(String[] args) { ...

Read More

The listIterator() method of CopyOnWriteArrayList in Java starting at a specified position

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 181 Views

The listIterator() method CopyOnWriteArrayList class returns a list iterator over the elements in this list, beginning at the specified position in the list.The syntax is as followspublic ListIterator listIterator(int index)Here, index is the index of the first element to be returned from the list iterator.To work with CopyOnWriteArrayList class, you need to import the following packageimport java.util.concurrent.CopyOnWriteArrayList;The following is an example to implement CopyOnWriteArrayList class listIterator() method in Java. We have set the index as 3, therefore, the list would be iterated from index 3Exampleimport java.util.Iterator; import java.util.ListIterator; import java.util.concurrent.CopyOnWriteArrayList; public class Demo {    public static void main(String[] args) ...

Read More

HTML <meter> value Attribute

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 173 Views

The value attribute of the element specifies the current value of the gauge. This is a required attribute.Following is the syntax −Above, num represents the current value as a floating-point number.Let us now see an example to implement the value attribute of the element −Example    Result    Girls pass %    Boys pass % OutputIn the above example, we have set the pass percentage of girls as well as boys using the element. The current value is set using the value attribute −Boys pass %

Read More

The contains() method of CopyOnWriteArrayList in Java

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 177 Views

The contains() method of the CopyOnWriteArrayList class is used to get the specified element. It returns TRUE if the element is in the List, else FALSE is returned.The syntax is as followsboolean contains(Object ob)Here, ob is the element to be checked for existence. To work with CopyOnWriteArrayList class, you need to import the following packageimport java.util.concurrent.CopyOnWriteArrayList;The following is an example to implement CopyOnWriteArrayList class contains() method in JavaExampleimport java.util.concurrent.CopyOnWriteArrayList; public class Demo {    public static void main(String[] args) {       CopyOnWriteArrayList arrList = new CopyOnWriteArrayList();       arrList.add(100);       arrList.add(250);       arrList.add(400); ...

Read More

Precedence of postfix ++ and prefix ++ in C/C++

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 2K+ Views

Here we will see the precedence of postfix++ and prefix++ in C or C++. The precedence of prefix ++ or -- has higher priority than dereference operator ‘*’ and postfix ++ or -- has priority higher than both prefix ++ and dereference operator ‘*’.When ptr is a pointer, then *ptr++ indicates *(ptr++) and ++*prt refers ++(*ptr)Example#include using namespace std; int main() {    char arr[] = "Hello World";    char *ptr = arr;    ++*ptr;    cout

Read More

Printing Heart Pattern in C

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 10K+ Views

In this program we will see how to print heart shaped pattern in C. The heart shape pattern will be look like thisNow if we analyze this pattern, we can find different section in this pattern. The base of the heart is an inverted triangle; the upper portion has two different peaks. Between these two peaks there is a gap. To make this pattern we have to manage these parts into our code to print the pattern like this.Example#include int main() {    int a, b, line = 12;    for (a = line/2; a

Read More

HTML <progress> max Attribute

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 131 Views

Tha max attribute of the tag in HTML is used to set the maximum value in a progress bar.Following is the syntax −Above, num represents the number in floating-point. It displays how much effort the task necessitates.Let us now see an example to implement the max attribute of the element −Example    Windows Build 10.58.89.1       Downloading and Installing:       OutputIn the above example, we have displayed the progress of a task going on using the − We have set the maximum value in the progress bar using the max attribute −max="100"

Read More

The iterator() method of CopyOnWriteArrayList in Java

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 158 Views

The iterator() method is used to return an iterator over the elements in this list.The syntax is as followsIterator iterator()To work with CopyOnWriteArrayList class, you need to import the following packageimport java.util.concurrent.CopyOnWriteArrayList;The following is an example to implement CopyOnWriteArrayList class iterator() method in JavaExampleimport java.util.Arrays; import java.util.Iterator; import java.util.concurrent.CopyOnWriteArrayList; public class Demo {    public static void main(String[] args) {       CopyOnWriteArrayList       arrList = new CopyOnWriteArrayList();       arrList.add(50);       arrList.add(90);       arrList.add(150);       arrList.add(200);       arrList.add(350);       arrList.add(500);       arrList.add(650);   ...

Read More
Showing 11–20 of 730 articles
« Prev 1 2 3 4 5 73 Next »
Advertisements