1.外部类使用外部类中的内部类
public class Outer {
int some_member;
abstract class InnerBase {
abstract void method();
}
}
class OuterExtendsInner extends Outer.InnerBase {
Outer ou = null ;
public OuterExtendsInner(Outer o) {
o.super();
this.ou = o ;
}
void method() {
int x = ou.some_member ;
// do some thing with some_member ;
}
}