Below is an example from Khalid Mugal, I am sorry I coudn't understand how this works. Can anybody shed some light into this.
class OuterA{
public class InnerA{
}
}
class SomeUnrelatedClass extends OuterA.InnerA{
SomeUnrelatedClass(OuterA outerRef){
outerRef.super();
}
//Added by me
SomeUnrelatedClass(){
new OuterA().super();
//new OuterA(); //why this won't work
}
}
public class Extending {
public static void main(
String args[]){
new SomeUnrelatedClass(new OuterA());
new SomeUnrelatedClass(); //Added by me
}
}