// access static via instance class AClass { public int get() { int i = this.fff; return i; } public static AClass getA() { return null; } Object gg() { return this.getA(); } static int fff; protected static class R { static int rr = 0; } public R getR() { return null; } } class anotherclass { int f(AClass d){ int i = d.getR().rr; return i; } }