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

Define Compiling?

3 Answers  


What is the size of int?

0 Answers  


Which data type is a class in java?

0 Answers  


What is prefix of a string?

0 Answers  


What is Exception handling in Java How do you handle run time errors please explain with an example

2 Answers   Mastek, TCS,






What is the difference between Abstract Class and Interface

8 Answers   Amdocs,


What is member in java?

0 Answers  


When finalize method is called?

3 Answers  


What are the types of casting?

0 Answers  


whats the diff between jsp and servlets?

9 Answers   HCL, TCS,


Can you explain the private protected field modifier?

0 Answers  


Describe the process as to how substring() methodology mechanisms in java.

0 Answers  


Categories