Difference between Enumeration and Iterator in Java
Java enumerations are only applicable for legacy classes e.g HashTable, and Vector. Iterator is the recommended way to iterate over collections since Java 1.2 and takes place of Enumeration.
Java enumerations are only applicable for legacy classes e.g HashTable, and Vector. Iterator is the recommended way to iterate over collections since Java 1.2 and takes place of Enumeration.
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.