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
How to create a custom exception?
What is the purpose of return statement?
Can we use a default constructor of a class even if an explicit constructor is defined?
What is an object’s lock and which object’s have locks?
What is the difference between the ">>" and " >>>" operators in java?
Should a main method be compulsorily declared in all java classes?
Why do we use string?
Is main a keyword in java?
Can we serialize singleton class?
What is pre increment and post increment in java?
What is string example?
What is the biggest integer?
If a class is declared without any access modifiers, where can the class be accessed?
Explain about object oriented programming and its features?
How will you compute size of a structure?