Java enums suck (as if everyone disagreed)

Java enums are translated by the compiler into a class that contains the enum elements as public static final fields.

If we put specific code into the enum elements, these fields become inner classes. (So that they can store code for each element)

One non-obvious consequence of this approach is that

Myenum.MyElement.getClass().getName() may return either Myenum or Myenum$n where n is an ordinal number of the element, depending on whether the element has associated code or not.