my dog learned polymorphism
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "enum, Enum, Enumeration, Enumerator, Iterator" Watch "enum, Enum, Enumeration, Enumerator, Iterator" New topic

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?

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:
subject: enum, Enum, Enumeration, Enumerator, Iterator
It's not a secret anymore!