Some time has passed since the last time I worked with Java, but if I remember correctly, there is no connection between your _value field and the enum serial number. AFAIK you could have two entries with the same _value , for example. As @bmargulies pointed out, you can have many fields in an enumeration, and nothing prevents you from using different values ββfor each (or all) of them.
See also this related question . Apparently, you cannot directly set the sequence number of your entries.
mgibsonbr
source share