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 do I need to install netbeans?
Which is faster c++ or java?
Why are command line arguments passed as a string?
Which interceptor is responsible for setting action javabean properties?
Explain issues of old java date api?
What is java flatmap?
What is java bean class?
How do you run an executable jar file?
Do I really have to type in the programs in the book to try them out?
What if I do not provide the string array as the argument to the method?
Is it correct to say that using parentheses can only change?
Is jvm a compiler or an interpreter?
What is the use of servlet in java?
How do you type the lambda symbol?
Are streams faster than for loops?