Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
enums are essentially just a list of constants. Enums can have integer values assigned to them (or any type for that matter) enum e { ONE(1), TWO(2), THREE(3); int value; e(int i) { value = i;} int getValue() { return value;} }
23rd Aug 2019, 9:36 PM
Andy Wong
Andy Wong - avatar