What's the difference between Enumeration and Iterator interfaces ?
What's the difference between Enumeration and Iterator interfaces ?
Answer
Enumeration is twice as fast as compared to an Iterator and uses very less memory. However, the Iterator is much safer compared to Enumeration, because other threads are not able to modify the collection object that is currently traversed by the iterator. Also,Iteratorsallow the caller to remove elements from the underlying collection, something which is not possible with Enumerations.
Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website.
If you are using this website then its your own responsibility to understand the content of the website