Here is a simple example of the new enumeration features in Java 1.5. The Java compiler translates enumerations into regular classes that inherit from the Enum class. This means that you define enumerations the same way as you define classes, with the exception that you use the enum keyword instead of class.
Read More...