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


Please Help Members By Posting Answers For Below Questions

What is transactional in java?

510


Why do we create dto in java?

484


What are the rules regarding quotation marks?

459


Explain the reason for each keyword of public static void main(string args[])?

487


What is meant by annotations in java?

478






What about products that claim to block java applets at a firewall? : java security

481


What is transient in java?

477


Define network programming?

521


When is static variable loaded? Is it at compile time or runtime? When exactly a static block is loaded in java?

493


What about javascript? : java security

521


What is a jvm?

534


What is java aop?

466


Can a dead thread be started again?

580


What is predicate in lambda expression?

465


What is stateful in java?

493