Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (6.5k points)
I don't know what an iterator is in Java.

1 Answer

0 votes
by (11.3k points)
  • If you have a Collection in JAVA and you want to go through the elements of it, step-by-step, you use an iterator.
  • These let you process each element of a Collection. 
  • The arrangment of the elements of the Collection is irrelevant to the iterating manner of the iterator. 
  • Iterators are implemented differently for every Collection. 
        

If you want to learn the hands-on of how to operate an iterator, you should look up a java tutorial for the same. That will make your concepts more clear.  

Browse Categories

...