V
vahan
We have some simple code(Bruce Eckel's book):
class WithInner {
class Inner {}
}
public class InheritInner
extends WithInner.Inner {
//! InheritInner() {} //DON' T compile
InheritInner(WithInner wi) {
wi.super(); // is OK
}
public static void main(String[] args) {
WithInner wi = new WithInner();
InheritInner ii = new InheritInner(wi);
}
}
question is following :
Why does it call "wi.super();", as I understand WithInner's super
class constructor?
Thanks
class WithInner {
class Inner {}
}
public class InheritInner
extends WithInner.Inner {
//! InheritInner() {} //DON' T compile
InheritInner(WithInner wi) {
wi.super(); // is OK
}
public static void main(String[] args) {
WithInner wi = new WithInner();
InheritInner ii = new InheritInner(wi);
}
}
question is following :
Why does it call "wi.super();", as I understand WithInner's super
class constructor?
Thanks