84
Java ListIterator hasNext() Method
The hasNext() method of ListIterator interface is used to return true if the given list iterator contains more number of element during traversing the given list in the forward direction.
Syntax
Parameters
NA
Specified by:
hasNext in interface Iterator<E>
Return
The above method is used to return true if the given list iterator contains more number of element during traversing the given list in the forward direction.
Example 1
Output:
The final list for long value is given as: 66 70 21
Example 2
Output:
The final list for the characters is given as: a e i o u
Example 3
Output:
The final list for integer value is given as: 22 44 88 11 33
Next TopicJava ListIterator