Ennumeration - sometimes you'll want to create a set of constant
values to represent the onlyvalid values for a
variable. This set of valid values is commonly
referred to as an enumeration.
When you create an enum, you're creating a new
class, and you're implicitly extending java . lang. Enum.
You can declare an enum as its own standalone
class, in its own source file, or as a member of another class.
In its simplest form, an enumeration is a list of named constants that
define a new data type. An object of an enumeration type can hold only
the values that are defined by the list. Thus, an
enumeration gives you a way to precisely define a new type of data that
has a fixed number of valid values.
Generics -