Java Enum classes
“An enum class (§8.9) is a class declared with abbreviated syntax that defines a small set of named class instances.” (JvLngSpc17 2021, Java Language Specification Java SE 17 Edition Chapter 8 - Classes | Chapter 8 - Classes)
- Snippet from Wikipedia: Enumerated type
In computer programming, an enumerated type is a data type consisting of a set of named values called elements, members, enumeral, or enumerators of the type. The enumerator names are usually identifiers that behave as constants in the language. An enumerated type can be seen as a degenerate tagged union of unit type. A variable that has been declared as having an enumerated type can be assigned any of the enumerators as a value. In other words, an enumerated type defines a set of discrete, mutually exclusive constants that are not generally written to a concrete representation in the computer's memory; compilers and interpreters can represent them arbitrarily without specification from the programmer.
