This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes enum, Enum, Enumeration, Enumerator, Iterator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "enum, Enum, Enumeration, Enumerator, Iterator" Watch "enum, Enum, Enumeration, Enumerator, Iterator" New topic
Author

enum, Enum, Enumeration, Enumerator, Iterator

Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 689

I think that I figured out what is what here.

enum is the new keyword in Java 5 that allows you to implement enumerated types.

Enum is a class in java.lang for which types defined using the enum keyword all all subclasses.

Enumerator is similiar to an Iterator only the Enumerator is an older class.

Iterator is a newer class than Enumeration that allows you to iterate over objects of classes that implement Iterable.

Then there is the new for-each loop in Java 5 that is an alternative to using an object of type Iterator to iteration over an array or an object that implements the Iterable interface.

Is this all right?

Kaydell
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Near enough.
Here's a summary of the new Java 5.0 features.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: enum, Enum, Enumeration, Enumerator, Iterator