Open manishkaushik900 opened 3 years ago
@manishkaushik900 It seems to be fix here
---> Enumeration:- Like a museum tour, it guides you through elements one by one, letting you observe but not interact. Think of legacy collections like Vector and Stack.
---> Iteration:- Like a playground, it lets you freely explore and even modify elements. Works with modern collections like ArrayList and HashMap.
While Enumeration is read-only, while Iteration lets us to add, remove, or change the elements.
Iteration is more flexible and works with most collections.
Enumeration don't have remove() method
Iterator have hasNext(), next(), remove() method. Enumeration have hasMoreElement(), nextElement() method only