19 lines
397 B
Java
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) */
|