Java ListIterator hasNext() MethodThe 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. SyntaxParametersNA Specified by:hasNext in interface Iterator<E> ReturnThe 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 1Test it NowOutput: The final list for long value is given as: 66 70 21 Example 2Test it NowOutput: The final list for the characters is given as: a e i o u Example 3Test it NowOutput: The final list for integer value is given as: 22 44 88 11 33 Next TopicJava ListIterator |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India