67,550
社区成员




class SuperClass {
SuperClass() throws Exception {
System.out.println(this.getClass().getName());
}
void show() {
System.out.println(super.getClass().getName());
show2();
}
void show2() {}
}
public class SubClass extends SuperClass {
SubClass() throws Exception {}
void show() {
super.show();
System.out.println(super.getClass().getName());
}
void show2() {
System.out.println(super.getClass().getSuperclass().getName());
}
public static void main(String args[]) throws Exception {
SuperClass s = new SubClass();
s.show();
}
}
(SuperClass)
SuperClass() throws Exception {
System.out.println(this.getClass().getName());
}
(SubClass)
void show() {
super.show();
System.out.println(super.getClass().getName());
}
(SuperClass)
void show() {
System.out.println(super.getClass().getName());
show2();
}