What is the purpose of an Iterator in Java?

Last Updated :
Discuss
Comments

What is the purpose of an Iterator in Java?


To modify elements in a collection

To traverse a collection one element at a time


To sort elements in a collection

To store elements in a collection

Share your thoughts in the comments