I have the following code. I want to get hold of the outer class object using which I created the inner class object inner. How can I do it?
inner
pub
Here's the example:
// Test public void foo() { C c = new C(); A s; s = ((A.B)c).get(); System.out.println(s.getR()); } // classes class C {} class A { public class B extends C{ A get() {return A.this;} } public String getR() { return "This is string"; } }