What is the differenc between Enemuration interface and
iterator interface according to accessing?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
Explain the role played by Java Virtual Machine in Java Programming?
What is class variable java?
What is the main purpose of serialization in java?
What is the benefit of inner / nested classes ?
how to write a program for chat function using core java
What are the drawbacks of reflection?
What are benefits of java?
What is meant by data hiding/encapsulation?
Explain public static void main(string args[]).
What is a map in java?
What is garbage collection? Can it be forced to run?
Is it possible to use Semaphore/ Mutex in an Interrupt Handler?