What is the difference between Enumeration and Iteration
interfaces? What is the way of to retreive the objects from
these interfaces ?
Answer Posted / suma
1.Enumeration interface applicable legacy implemented classes.
Iterator is applicable for all collection implemented classes.
2.Enumeration :While iterating the elements we are not
allowed to remove the objects just we can perform only read
operation
Iterator:While iterating we can perform removal also in
addition to read operation
3. Enumeration uses elements() method ,
Iterator uses iterator() method
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What is aop java?
What is tier in java?
What is java flatmap?
What is meant by pass by reference and pass by value in java?
Explain working of java virtual machine (jvm)?
What is an api in java?
What is jdk jre and jvm?
What is a controller in java?
Do I need jdk or jre?
What is lsdou? : java security
What is map and flatmap?
Where are group policies stored? : java security
What are struts java?
What is entitymanager in jpa?
What is the difference between collection and stream?