• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

enum, Enum, Enumeration, Enumerator, Iterator

 
Kaydell Leavitt
Ranch Hand
Posts: 689
Eclipse IDE Firefox Browser Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7729
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Near enough.
Here's a summary of the new Java 5.0 features.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic