In Sun Press Book The
Java Programming Language Third Edition:
For
class Outer{
class Inner{
}
}
It is said for extending inner class that
<Quote>
If the enclosing class of the inner subclass is not a subclass of Outer, or if the inner subclass is not itself an inner class, then an explicit reference to an object of Outer must be supplied when the Inner constructor is invoked via super.
</Quote>
They have given follwing code for extending
class Unrelated extends Outer.Inner{
Unrelated(Outer ref){
ref.super();
}
}
I can not understand why in the constructor there is need to call ref.super() ???
Reference: Chapter 5 section 5.2.2 Page 127.