Quoting from the JLS link given earlier.
Paul Clapham wrote:. . . An enum declaration is implicitly final unless it contains at least one enum constant that has a class body (§8.9.1)."
I think I misunderstood that bit about implicitly final at first. I thought that meant that an
enum with class bodies can be extended by a different XXX.java file or compilation
unit. I think it actually means that
enums with class bodies extend themselves. They cannot be extended elsewhere. The constants with class bodies look like instances of anonymous classes. I don't know whether they really are anonymous classes.
If you write a compilation unit extending an
enum with class bodies for every constant, e.g. the Operation
enum from the
Java™ Language Specification (=JLS), you will see you get a compiler error.
If you go through the first JLS link I gave you, you will find out why you can't write
enum XYZ extends...