CodesJava

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

Sign Up/ Sign In
Ask a Question


Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki