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 lambda used for?
What is the difference between ec2 and lambda?
Where is singleton design pattern used in java?
What about products that claim to block java applets at a firewall? : java security
What if I write static public void instead of public static void?
What type of parameter passing does java support?
What is java lang exceptionininitializererror?
ioc vs dependency injection?
What is a bean class?
What is loose coupling in java?
What does public static void main(string[]) mean?
How do I download and install eclipse on windows 10?
What do I need to install netbeans?
How do you check if java is installed on windows command prompt?
What is an action class in java?