Citation :
* enums are implicitly final subclasses of java.lang.Enum
* if an enum is a member of a class, it is implicitly static
* new can never be used with an enum, even within the enum type itself
* name and valueOf simply use the text of the enum constants, while toString may be overridden to provide any content, if desired
* for enum constants, equals and == amount to the same thing, and can be used interchangeably
* enum constants are implicitly public static final
* the order of appearance of enum constants is called their "natural order", and defines the order used by other items as well : compareTo, iteration order of values , EnumSet, EnumSet.range.
|