What is the difference between Enumeration and Iteration
interfaces? What is the way of to retreive the objects from
these interfaces ?
Answer Posted / 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 |
Post New Answer View All Answers
What is transactional in java?
Why do we create dto in java?
What are the rules regarding quotation marks?
Explain the reason for each keyword of public static void main(string args[])?
What is meant by annotations in java?
What about products that claim to block java applets at a firewall? : java security
What is transient in java?
Define network programming?
When is static variable loaded? Is it at compile time or runtime? When exactly a static block is loaded in java?
What about javascript? : java security
What is a jvm?
What is java aop?
Can a dead thread be started again?
What is predicate in lambda expression?
What is stateful in java?