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

How common are security breaches? : java security

0 Answers  


Describe the principles of oops.

0 Answers  


How can one prove that the array is not null but empty?

0 Answers  


What is a jvm?

0 Answers  


What is orm in java?

0 Answers  


what is reflection api? How are they implemented?

0 Answers  


Do I need both jdk and jre?

0 Answers  


suppose we have one String s="india is my country"; now we get the o/p "like country my is India". what is the logic?

2 Answers  


What is type_scroll_insensitive in java?

0 Answers  


Why is struts used in java?

0 Answers  


For each of the following program segments,give a big zero analysis for the running time 1.For (i=0;i<m;i++) { // } 2.For (j=0;j<i;j++)

0 Answers   St. Pauls University,


What is tight coupling in java?

0 Answers  


Categories