I need to traverse a LinkedList
a number of times, in a way that suggests using ListIterator
.
Is there a way to reset a ListIterator
? or is it better to just create a new one? (and what if I can't because I don't have access to the list?)
edit: and is there a way to create a ListIterator
that points to the end of the list? (so that hasNext()
is false but I can use previous()
or hasPrevious()
)