A look at the iterator() method 

Each of the classes in the Collection framework provide an iterator() method that returns an iterator object to the start of the collection. The iterator object implements either the Iterator or the ListIterator interface. There are two main differences between the Iterator and ListIterator interfaces:

  • Iterator is used for traversing both list and set. ListIterator is used to traverse only lists.
  • Only forward traversal is possible using Iterator. Bi-directional traversal is possible using ListIterator.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.218.215