package arraydemo;
import arraydemo.Outer.Inner;
class Outer{
int age = 25;
protected void trace(Object word){
System.out.println(word.toString());
}
abstract class Inner{
String name = "张三";
public abstract void write(Object something);
}
}
public class AbstractDemo extends Inner{//此处报错,由于某些中间构造函数调用,没有任何类型 Outer 的外层实例可用
static Outer out = new Outer();
public static void main(String[] args) {
System.out.println(out.age);
Outer.Inner in = out.new Inner();
}
public void write(Object something){
System.out.println(something.toString());
}
}