public class Main {
public static void main(String[] args) {
new B();
}
static class A {
void foo() {
try {
this.getClass().newInstance();
} catch(Exception e) {
e.printStackTrace();
}
}
}
static class B extends A {
B() { foo(); }
void foo() { super.foo(); }
}
}
davewp
- 111
- 3