[/code]class Outer {
class Inner { }
}
public class InheritInner extends Outer.Inner{
InheritInner() {}
public static void main(
String [ ] args) {
Outer o = new Outer( ) ;
InheritInner ii = new InheritInner( ) ;
}
}
[code]
This program gives the following error. How can we rewrite it such that it gives no compile time error.
InheritInner.java:8: No enclosing instance of class Outer is in scope; cannot create a default constructor for class InheritInner.
InheritInner() {}