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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the access modifiers available in java?

569


What does it mean to be immutable?

552


What is array and arraylist in java?

535


I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?

525


Java.util.regex consists of which classes?

551






Is linkedlist thread safe in java?

565


Is there a case when finally will not execute?

569


What is a method header?

550


What is the difference between an object-oriented programming language and object-based programming language?

578


How do you stop a thread in java?

600


Why is flag used in java?

553


How many bytes is a char in java?

533


What is difference between final and finally in java?

590


What is main string [] args?

524


What do bitwise operators do?

531