Friday, March 13, 2009

What is the difference between Iterator and Enumeration (JavaUtil)

Question :What is the difference between Iterator and Enumeration? (JavaUtil)
Answer :Iterator takes the place of Enumeration in the Java collections framework.
Iterators differ from enumerations in two ways: Iterators allow the caller to
remove elements from the underlying collection during the iteration withwell-defined semantics. Method names have been improved

No comments: