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 an api in java?

0 Answers  


Is openjdk the same as jdk?

0 Answers  


If one class havent the constructor, it has normal method, then can i use super keyword to call the method form the sub class and vice verse?

2 Answers  


Who created eclipse?

0 Answers  


there are 67 seats in train . there are only 5 seats in a row and in last row there are only 2 seats. One person can reseve only 5 seat at a time. If person reserving seat , the care is atken that he may get all in row. if seats are not available in row then the arrangement is so that person group get nearby seats. the following class is given public class seat { char name; int seat; boolean isSeatempty } 1.Draw require class digram and object diagram. 2.Write function seatallot(int noofperson) to allocate seat with seat nuber printed for the each name.

0 Answers   Sapient,






What is meant by swing in java?

0 Answers  


How do I enable jvm?

0 Answers  


What is cache in java?

0 Answers  


Where are group policies stored? : java security

0 Answers  


What is the difference between deep copy and shallow copy in java

0 Answers   Amazon,


Who is at risk in java? : java security

0 Answers  


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

1 Answers   Cap Gemini,


Categories