You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1234567891011121314151617 |
- public class PrivateSuperInnerAccess {
- public static void main(String argv[]) {
- Outer.C c = new Outer().new C();
- c.foo();
- }
- }
-
- class Outer {
- class B {
- private int x = 5;
- }
- class C extends B {
- int foo() {
- return super.x+1;
- }
- }
- }
|