Iterator
Steps through a list one element at a time. A for loop uses it for you.
InterfaceJavaJava 11 docs
public interface Iterator<E>Members
hasNext()
public boolean hasNext()Whether another element follows.
Returns
true if there is one.
next()
public E next()The next element.
Returns
The element.
Also allowed
These work as in the Java 11 docs.
equals, forEachRemaining, hashCode, remove, toString