Javatpoint Logo
Javatpoint Logo

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

Test it Now

Output:

The final list for long value is given as: 
66
70
21

Example 2

Test it Now

Output:

The final list for the characters is given as: 
a
e
i
o
u

Example 3

Test it Now

Output:

The final list for integer value is given as: 
22
44
88
11
33





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA