Main differences between Iterator and Enumeration in Java are:
1. Version: Enumeration interface is in Java since JDK 1.0.
Iterator interface was introduced in Java 1.2.
2. remove() method: The main difference between
Enumeration and Iterator interface is remove() method.
Enumeration can just traverse a Collection object. If we
use Enumeration, we cannot do any modifications to a
Collection while traversing the collection. Iterator
interface provides remove() method to remove an element
while traversing the Collection. There is not remove()
method in Enumeration interface.
3. Method names: Names of methods in Iterator interface are
hasNext(), next(), remove(). Names of methods in
Enumeration interface are hasMoreElements(),
nextElement().
4. Legacy Interface: Enumeration is considered as a legacy
interface. It is used to traverse legacy classes like Vector,
Stack and HashTable. Iterator is a newer interface that is
used to traverse almost all of the classes in Java
Collections framework.
5. Fail-fast vs. Fail-safe: Iterator is based on fail-fast
principle. It throws ConcurrentModificationException if a
collection is modified during iteration over that collection.
An Enumeration is based on fail-safe principle. It doesn’t
throw any exception if a collection is modified during
traversal.
6. Safety: Since Iterator is fail-fast and does not allow
modification of a collection by other threads, it is
considered safer than Enumeration
https://www.geeksforgeeks.org/difference-between-iterator-and-enumeration-in-java-with-examples/