java enum to string

Solutions on MaxInterview for java enum to string by the best coders in the world

showing results for - "java enum to string"
Lavinia
14 Jan 2019
1public enum MyEnum{
2	SOMETHING,SOMETHING_ELSE
3}
4MyEnum enumObject=MyEnum.SOMETHING;
5System.out.println(enumObject.toString());
6System.out.println(enumObject.name());