Get Enumeration over Java ArrayList Example

Want to learn quickly?
Try one of the many quizzes. More than Java 400 questions with detailed answers.

Add Comment

  • Thanks for providing such simple and understandable example…

    what will happen if we use Iterator in place if Enumeration. ??

    and what is the difference in this program between by using enumeration and by using Iterator.

    • both will be same except you will get on extra method remove() with iterator. And enumeration with Collection classes which are not legacy will be fail to fast.


Facebook Fans