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 are virtual functions?

2 Answers  


How we can generate random numbers in java?

0 Answers  


i need to know the website that i can compile and run a java code in online.(while system doesn't contain any jdk and jre)

0 Answers  


What is the char data type?

0 Answers  


How we can run a jar file through command prompt in java?

0 Answers  


What is the protected method modifier?

0 Answers  


What is finalize()?

0 Answers  


How can you make sure that your singleton class will always return single instance in multi-threaded environment?

0 Answers  


How many times finalize method will be invoked? Who invokes finalize() method in java?

0 Answers  


How many bits does a boolean take?

1 Answers  


what is the difference between String s="hello"; and String s=new String("hello");?

3 Answers  


Which class is the superclass for every class in java programming?

0 Answers  


Categories