What differences exist between Iterator and ListIterator ?

Answer

The differences of these elements are listed below:
An Iterator can be used to traverse the set and List collections, while the ListIterator can be used to iterate only over Lists
The Iterator can traverse a collection only in forward direction, while the Listlterator can traverse a List in both directions.
The ListIterator implements the Iterator interface and contains extra functionality, such as adding an element, replacing an element, getting the index position for previous and next elements, etc.

All Java Questions

Ask your interview questions on java

Write Your comment or Questions if you want the answers on java from java Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---