What is the differenc between Enemuration interface and
iterator interface according to accessing?

Answers were Sorted based on User's Feedback



What is the differenc between Enemuration interface and iterator interface according to accessing?..

Answer / ravikiran

Enumeration contains elements method for iteration.
And hasMoreElements and nextelement() methods to get the
values from the collection.
Iterator contains iterator() method for iteration
And hasnext() and next() methods for the retrieval of
values from the collection.

Is This Answer Correct ?    3 Yes 0 No

What is the differenc between Enemuration interface and iterator interface according to accessing?..

Answer / muthuraman

Enumeration is a read only interface, by using this we can
loop thro' the elements only. But using iterator interface
we can traverse and also remove the object.

Is This Answer Correct ?    2 Yes 1 No

What is the differenc between Enemuration interface and iterator interface according to accessing?..

Answer / suresh gangapatnam

While iteration we can remove the elements but it's not in
case enumeration and Enumeration is faster than the
iteration.

Is This Answer Correct ?    1 Yes 1 No

What is the differenc between Enemuration interface and iterator interface according to accessing?..

Answer / eganesh

Enumeration and Iterator both are using looping statement.
Enumeration is legacy class.iterator is cotains extra
method than Enumeration.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Core Java Interview Questions

What is a java list?

0 Answers  


Difference between this() and super() ?

0 Answers  


Is java code slower than native code?

0 Answers  


How java is platform independent?

41 Answers   College School Exams Tests, Infosys, TCS,


Is it possible to write a regular expression to check if string is a number?

0 Answers  






What are Normalization Rules? Define Normalization?

0 Answers  


How to store image in arraylist in java?

0 Answers  


how to create multithreaded program? : Java thread

0 Answers  


Can you call a method in a method?

0 Answers  


Which api is provided by java for operations on set of objects?

0 Answers  


Why array is used in java?

0 Answers  


What is meant by flickering?

0 Answers  


Categories