Easy learning with example program codes

What is the difference between Iterator and Enumeration?

Iterator Enumeration
It can traverse legacy and non-legacy elements. It can traverse only legacy elements.
It is fail-fast. It is not fail-fast.
It is slower than Enumeration. It is faster than Iterator.

Java interview questions on collections

Please follow and like us:

Copyright © 2019 CodesJava Protection Status SiteMap Reference: Java Wiki