2015-04-20 15:36:01 -07:00
|
|
|
|
//: innerclasses/InheritInner.java
|
2015-05-29 14:18:51 -07:00
|
|
|
|
// <20>2015 MindView LLC: see Copyright.txt
|
2015-04-20 15:36:01 -07:00
|
|
|
|
// 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);
|
|
|
|
|
}
|
|
|
|
|
} ///:~
|