Enums in Java are type-safe and have their own namespace.
name()
The method returns the name of the enum constant, exactly as declared in its enum declaration.