Iterator and ListIterator are two interfaces in Java to traverse data
structures. The differences between these two are:
1. ListIterator can be used to traverse only a List. But Iterator
can be used to traverse List, Set, and Queue etc.
2. An Iterator traverses the elements in one direction only. It
just goes. ListIterator can traverse the elements in two
directions i.e. backward as well as forward directions.
3. Iterator cannot provide us index of an element in the Data
Structure. ListIterator provides us methods like nextIndex()
and previousIndex() to get the index of an element during
traversal.
4. Iterator does not allow us to add an element to collection
while traversing it. It throws
ConcurrentModificationException. ListIterator allows use
to add an element at any point of time while traversing a
list.
5. An existing element’s value cannot be replaced by using
Iterator. ListIterator provides the method set(e) to replace
the value of last element returned by next() or previous()
methods
https://www.geeksforgeeks.org/difference-between-an-iterator-and-listiterator-in-java/