- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference Between Iterator and Enumeration Interface in Java
In this post, we will understand the difference between iterator and enumeration interfaces in Java.
It is a universal cursor.
It can be applied to all collection of classes.
It contains the ‘remove’ method.
It is not a legacy interface.
It can be used to traverse over HashMap, LinkedList, ArrayList, HashSet, TreeMap, and TreeSet .
It can perform modifications to perform operations on the collection while traversing through it.
It is not a universal cursor.
It is applied only to legacy classes.
It doesn’t contain the ‘remove’ method.
It is a legacy interface.
This interface acts like a read-only interface.
Hence, no modifications can be performed on a collection while traversing over the elements in a Collection.
It can be used to traverse over Vectors, and Hashtable.
- Difference between Iterator and Enumeration in Java
- What is the difference between Enumeration interface and enum in Java?
- Difference between Iterator and Spilt Iterator in Java.
- Difference Between Iterator and ListIterator in Java
- Difference between an Iterator and ListIterator in Java
- Difference Between Class and Interface in Java
- Difference between Abstract Class and Interface in Java
- Difference between Runnable and Callable interface in java
- Difference between Python iterable and iterator
- Difference Between Thread Class and Runnable Interface in Java
- Difference between abstract class and interface
- Difference between default and static interface method in Java 8.
- Difference Between Interface and Abstract Class in Java & C#
- Difference between Abstract Class and Interface in C#
- Difference between IComparable and IComparer Interface in C#