What are the differences between enumeration and iterator?
Between two Enumeration is older and its there from jdk 1.0 while iterator was introduced later.
The functionality of Enumeration interface is duplicated by the Iterator interface.
Iterator has a remove() method while Enumeration doesn’t. Enumeration acts as Read-only interface, because it has the methods only to traverse and fetch the objects, where as using Iterator we can manipulate the objects also like adding and removing the objects.
to read more see here difference between iterator and enumeration
Thanks
Javin
deadlock in java