what is diff bet iterator and enumeration?

Answer Posted / aslam

Iterator has an additional method remove() and also
iterator checks for the concurrent modifications which will
be useful in multi threaded applications.

while Enumerator is much faster for sequential
access over collection elements, because it doesnot have
the additional overhead of checking concurrent modifications

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does a void function return?

540


if u open login & logout ,how can udisplay the timelogin & logout members ?

1746


Can finally block be used without a catch?

538


What is a lambda expression ? What's its use ?

558


What are the 6 functions?

503






What is a buffer in java?

564


Can we have any code between try and catch blocks?

550


Can you sort a string in java?

480


What is finalize() function in java?

550


What is string value?

630


How do you do math powers in java?

568


Outline the major features of java.

561


When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?

752


List down the methods and interfaces of collection class in java.

533


List some java keywords sun like c, c + + keywords?

581