OnJava8-Examples/innerclasses/InheritInner.java
2015-11-03 12:00:44 -08:00

19 lines
397 B
Java

// innerclasses/InheritInner.java
// Inheriting an inner class.
class WithInner {
class Inner {}
}
public class InheritInner extends WithInner.Inner {
//! InheritInner() {} // Won't compile
InheritInner(WithInner wi) {
wi.super();
}
public static void main(String[] args) {
WithInner wi = new WithInner();
InheritInner ii = new InheritInner(wi);
}
}
/* Output: (None) */