What differences exist between Iterator and ListIterator ?
The differences of these elements are listed below:
Iteratorcan be used to traverse the
Listcollections, while the
ListIteratorcan be used to iterate only over
Iteratorcan traverse a collection only in forward direction, while the
ListIteratorcan traverse a
Listin both directions.
Iteratorinterface and contains extra functionality, such as adding an element, replacing an element, getting the index position for previous and next elements, etc.