answersLogoWhite

0

1.Iterator has remove method while enumeration doesn't have it.

2.Iterator is new in Java API but Enumeration is older one.

3. Iterator extends functionality of Enumeration.

4. Iterator is more secure and safe as compared to Enumeration because it does not allow other thread to modify the collection object while some thread is iterating over it and throws ConcurrentModificationException.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is Re usability in java?

Reusability in Java means that once you write some code, you can use it over and over again - if you write it so that it can be reused. For example, if you write a Enumeration-Iterator adapter, or some code that lets you treat an Enumeration - Java legacy code - as an Iterator - shiny NEW Java code - then you can use it not only in your animal simulation program, but also in your Jacuzzi interface program.


What is the difference between an enumeration and macro?

In enumeration, values can be generated for us but in macros we have to give value for every macro template and type checking can be done in enums.


What is an enumeration sentence?

enumeration sentence can be used in a sentence as such. enumeration means numbered words..


What does Amendment Nine talks about the enumeration of rights. Enumeration means a .?

Enumeration means a LIST.Hope this answered your question.


What is the Tagalog word for enumeration?

Tagalog word of enumeration: isa-isahin


Is Iterator a class or Interface?

Its an interface.


What is the hasnext method?

Iterator.hasNext() is one of the two main methods of the Iterator interface. It can be used on an Iterator to find out if there are any remaining objects to iterate over. For example, it would be used like this: Iterator iter = ...; while (iter.hasNext()) { // do something with iter.next()... }


Why do you have enumeration?

There are different methods for naming a integer constant, one such method is enumeration. Enumeration is created by using the keyword enum.


What does a Sample of a letter with enumeration look like?

sample of letter with enumeration


How do you write method pubic boolean containsString s Return whether the given string is in the array or not?

Return an iterator to the string if it exists, or the container's end iterator if it does not.


Enumeration of steps of scientific method?

hi i have ask which of the following is not a method enumeration


What are the various functions in iterator class in java?

There are mainly three Methods available in the iterator class in java. Namely they are ... 1. Has Next 2. Next and 3. Remove.