What is the difference between Enumeration and Iteration
interfaces? What is the way of to retreive the objects from
these interfaces ?
Answer / suma
1.Enumeration interface applicable legacy implemented classes.
Iterator is applicable for all collection implemented classes.
2.Enumeration :While iterating the elements we are not
allowed to remove the objects just we can perform only read
operation
Iterator:While iterating we can perform removal also in
addition to read operation
3. Enumeration uses elements() method ,
Iterator uses iterator() method
| Is This Answer Correct ? | 8 Yes | 0 No |
What is a context in java?
What is the difference between a jvm and a jdk?
What is the java api?
What is meant by java se?
What is meant by annotations in java?
Input :14000 Output : hundred and fourteen thousand.(wrong) Desired output : fourteen hundred thousand.
What are the advantages of java 8’s date and time api over old date api and joda time api?
what are the different phases in delivering the project during development and maintenance?
Do I really have to type in the programs in the book to try them out?
Why is class forname used in java?
Is jar an executable?
How do I run a java project in netbeans?