mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
22 lines
461 B
Java
22 lines
461 B
Java
class TestSuper {
|
|
public static class A {
|
|
private String s = "A";
|
|
|
|
public void foo() {
|
|
System.out.println("A::foo");
|
|
}
|
|
}
|
|
|
|
public static class B extends A {
|
|
|
|
public void foo() {
|
|
super.foo();
|
|
System.out.println("B::foo " + super.s);
|
|
System.out.println("B::foo " + ((A) this).s);
|
|
}
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
new B().foo();
|
|
}
|
|
} |