Category: Reference Value Assignment Conversions
-
Using Type-Safe Enums – Object-Oriented Programming
Using Type-Safe Enums Example 5.24 illustrates using enum constants. An enum type is essentially used as any other reference type, and the restrictions are noted later in this section. Enum constants are actually final, static variables of the enum type, and they are implicitly initialized with instances of the enum type when the enum type…