This code:
public class Sandbox {
public enum E {
VALUE {
@Override
public String toString() {
return \"I
If you take the following into account, your concern may be lessened:
A class which has no non-private constructor is effectively final since it is impossible to declare its subclass outside of its body. It is a minor technical detail whether the class defined by an enum
is declared final
or not: it will in either case be effectively final.