File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Enumerator Vs Iterator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Enumerator Vs Iterator" Watch "Enumerator Vs Iterator" New topic
Author

Enumerator Vs Iterator

velmurugan
Greenhorn

Joined: Jun 08, 2006
Posts: 24
Hi,

What is the difference between Enumerator and Iterator?
Where we use Enumarator and where we use Iterator?

Any one Please help me...
naidu gulla
Greenhorn

Joined: Jul 19, 2006
Posts: 14
The main difference is Enumerator does not provide a standard method for
for removing tehe objects.
Iterator has provided method for removing the objects.
Arafat Nalkhande
Ranch Hand

Joined: Jul 20, 2006
Posts: 51
Well to start off with there is no class/interface in java called as Enumerator. Though there is Interface called Enumeration.

Iterator takes the place of Enumeration in the Java collections framework. Iterators differ from enumerations in two ways:

1) Iterators allow the caller to remove elements from the underlying collection during the iteration with well-defined semantics.
2) Method names have been improved.


I want to be myself, but a better myself.<br />~ SCJP 1.4 (91%), SCWCD 1.4 (86%) ~
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
This thread
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Enumerator Vs Iterator