wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 688

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.
 
wood burning stoves
 
subject: enum, Enum, Enumeration, Enumerator, Iterator
 
Similar Threads
[Interview Q] Why does array index begin with 0 instead of 1 ???
Of Enumerators and Iterators
enhanced for loop question
Using Iterable
Iterator & Enumeration