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 are the new features about Java se 8 ?
Why sun introduce concept of anonymous class? What is need and real life use of anonymous class
What is jndi datasource in java?
What do you mean by exception handling?
What's the difference between local, global and universal groups? : java security
Can we write lambda without functional interface?
What is orm in java?
what are the different phases in delivering the project during development and maintenance?
What is dialect in java?
What are jpa annotations?
If you’re overriding the method equals() of an object, which other method you might also consider?
What is the use of flatmap in java 8?
What is the difference between ec2 and lambda?
can anyone tell me what kind of questions are asked for core java exam in aptech
What is web xml java?