[ Geeksforgeeks.org Link ]
By default enums have their own string values, we can also assign some custom values to enums. Consider below example for that.
APPLE(“RED”), BANANA(“YELLOW”), GRAPES(“GREEN”);
In above example we can see that the Fruits enum have three members i.e APPLE, BANANA and ORANGE with have their own different custom values RED, YELLOW and...
View details ⇨
Enum with Customized Value in Java - GeeksforGeeks