Why can't a Java enum be final?
问题 public interface Proposal { public static final enum STATUS { NEW , START , CONTINUE , SENTTOCLIENT }; } Java does not allow an enum to be final inside an interface, but by default every data member inside an interface is public static final . Can anybody clarify this? 回答1: An enum can't be final, because the compiler will generate subclasses for each enum entry that the programmer has explicitly defined an implementation for. Moreover, an enum where no instances have their own class body is