I have couple of questions on enum.
Q1: is it necessary that enum constants should be in the first place with comma separated once I declare like
SHAPE, BALL, PEN; -> Correct one
SHAPE, BALL, PEN; -> WRONG ONE. Since constants are not in first place.
so the bottom line for the first question is, If at all I have enum costants that should be in the first line is it right ?
I have an emum like
-> I can not have these because there is one arg constructor declared so I need to have all the constants to be declared like WATER(2), BOOK(4),
is it correct ?
q3: I can have enums declared in another enum and like a chain right ? this is something like inner classes. So in this case all the inner class rules apply to these enums also ?
q4: Is enum follow like class hierarchy ?
Hope my questions are not stupid. Thanks for the answers.