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 |
Why are functions called methods in java?
Can a private method of a superclass be declared within a subclass?
what is difference between front controller and action servlet?
Can we convert stringbuilder to string in java?
Name the types of mouse event listeners ?
What's the access scope of protected access specifier?
What is the difference between notify and notifyall method?
To what value is a variable of the Boolean type automatically initialized?
What is a qualifier in a sentence?
what is translator and it types
Can we start a thread twice in java?
How do you do exponents in java?