What Field Modifier
Why Enumerate a Type?
Statements Updated for Enumerations
More Complicated Enumerated Types
Some Light Relief—The Haunted Zen Garden of Apple
Enumerated types were brought into Java with the JDK 1.5 release. They are not a new idea in programming, and lots of other languages already have them. The word “enumerate” means “to specify individually”. An enumerated type is one where we specify individually (as words) all the legal values for that type.
For a type that represents t-shirt sizes, the values might be small, medium, ...