Google News
logo
Java - Interview Questions
What is the difference between Iterator and Enumeration?
Both are useful to retrieve elements from a collection. Iterator has methods whose names are easy to follow and Enumeration methods are difficult to remember. Also Iterator has an option to remove elements from the collection which is not available in Enumeration. So Iterator is preferred to Enumeration
Advertisement