A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
Programmer Certification (SCJP/OCPJP)
enum, Enum, Enumeration, Enumerator, Iterator
Joined: Nov 18, 2006
May 29, 2007 04:29:00
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?
Joined: Aug 03, 2002
May 29, 2007 05:04:00
summary of the new Java 5.0 features.
Ask a Meaningful Question
Getting someone to think and try something out is much more useful than just telling them the answer.
rocket mass heater
subject: enum, Enum, Enumeration, Enumerator, Iterator
Iterator & Enumeration
[Interview Q] Why does array index begin with 0 instead of 1 ???
enhanced for loop question
Of Enumerators and Iterators
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014