«
^
»
9.3 The methods provided by java.lang.Enum
As mentioned earlier,
each enum type has
toString
,
hashCode
and
equals
methods.
This is because each enum type extends the type
java.lang.Enum
.
Besides those methods,
java.lang.Enum
also declares methods called
compareTo
,
valueOf
,
values
and
ordinal
.