What is an Iterator? Ans. Some of the collection classes provide traversal of their contents via a java.util.Iterator interface. This interface allows you to walk through a collection of objects, operating on each object in turn. Remember when using Iterators that they contain a snapshot of the collection at the time the Iterator was obtained; generally it is not advisable to modify the collection itself while traversing an Iterator. - Study24x7
Social learning Network
10 Nov 2023 10:47 AM study24x7 study24x7

What is an Iterator? Ans. Some of the collection classes provide traversal of their contents via a java.util.Iterator interface. This interface allows you to walk through a collection of objects, operating on each object in turn. Remember when using Iterators that they contain ...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles