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

What is loose coupling in java?

0 Answers  


What are jdk tools?

0 Answers  


How many types of jdk are there?

0 Answers  


What is an action class in java?

0 Answers  


Explain the reason for each keyword of public static void main(string args[])?

0 Answers  






What is the difference between lambda expression and anonymous methods?

0 Answers  


What is a pojo class in java?

0 Answers  


What is java api?

0 Answers  


How to reverse the singly linked list(In Node data members are(int data,int pointerTONext))

0 Answers  


What is javacpl?

0 Answers  


Why are command line arguments passed as a string?

0 Answers  


What is gpt and gpc? : java security

0 Answers  


Categories