Java ArrayList Iterator() method

The ArrayList.Iterator () returns an iterator over the elements in this list.

Syntax:

Parameter:

No parameters.

Return:

Returns "Iterator": returns an iterator over the elements in this list.

Example 1

Test it Now

Output:

[d, dd, ddd, dddd, ddddd]
d
dd
ddd
dddd
ddddd

Next TopicJava ArrayList




Latest Courses