Java Interview Questions and Answers
What is an Iterator? 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 and to operate on each object in turn. When using Iterators that contain a snapshot of the collection at the time the Iterators were obtained, it is not advisable, in general, to modify the collection itself while traversing an Iterator.