+ 1
What is "List Iterator" in Java?
2 Respuestas
+ 1
I recommend using the oracle documentation. Very well described.
https://docs.oracle.com/javase/7/docs/api/java/util/ListIterator.html
I hope it will help :)
+ 1
Iterator is an object that remember a position in a sequence of elements, and it's methods can get next element or has access to these elements
ListIterator is the interface for iterators in List implementations.
ArrayList<Integer> arr = new ArrayList<>(List.of(1,2,3,4,5));
ListIterator<Integer> it = arr.listIterator();
do
System.out.print(it.next() ); //12345
while(it.hasNext() );