public enum MyEnum{
SOMETHING,SOMETHING_ELSE
}
MyEnum enumObject=MyEnum.SOMETHING;
System.out.println(enumObject.toString());
System.out.println(enumObject.name());
yourEnum.name()
SMALL.toString()
// returns "SMALL"
String name = Modes.mode1.name(); // Returns the name of this enum constant, exactly as declared in its enum declaration.