<<< Local classes | Index | Enumeration syntax >>> |
Enumeration is a set of named constants, usually logically related.
Each constant has uniquie transparent ordinal value, such as 0, 1, 2, 3, and so on.
Enumerations can be specified
in a separate file within a package
in a related class file
nested within a class
Enumeration type recognizes each of the named constant, but not the bare ordinal values
The ordinal() method of the Enumeration type provides the actual ordinal value of a particular named constant
<<< Local classes | Index | Enumeration syntax >>> |