public enum A {
A(1);
private A(int i){
}
private A(){
super(); // compile - error
// Cannot invoke super constructor from enum constructor A()
}
}
这是enum A
extends from abstract java.lang.Enum
extends的层次结构java.lang.Object
Class c = Class.forName("/*path*/.A");
System.out.println(c.getSuperclass().getName());
System.out.println(Modifier.toString(c.getSuperclass().getModifiers()).contains("abstract"));
System.out.println(c.getSuperclass().getSuperclass().getName());