What is the difference between Enumeration and Iteration
interfaces? What is the way of to retreive the objects from
these interfaces ?



What is the difference between Enumeration and Iteration interfaces? What is the way of to retreiv..

Answer / 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

More Java Related AllOther Interview Questions

Which version of jdk is required for netbeans 8.0 2?

0 Answers  


What type of parameter passing does java support?

0 Answers  


Is lambda expression an object?

0 Answers  


Is java installed on windows 10?

0 Answers  


What is the locale class?

0 Answers  


What is interceptor in java?

0 Answers  


What are struts java?

0 Answers  


Spring framework ---Can somebody explain me in easily understandable format about AOP, IOC and DI, so that i can explain in interview rather than just telling what is available in net. I am not able to understand that also. I am new to Spring

0 Answers  


How do you create a jar file?

0 Answers  


How does jpa repository work?

0 Answers  


In java thread programming, which method is a must implementation for all threads?

0 Answers  


How should I format my code? How should I comment my code?

0 Answers  


Categories