No enclosing instance of type Person is accessible. Must qualify the allocation with an enclosing instance of type Person (e.g. x.new A() where x is an instance of Person).
问题:抽象类不能当作成员属性来使用,可以定义但是访问不到
解决方法:不要放在类的本身,把抽象类从main方法中拿出来与最上面的类平级
No enclosing instance of type Person is accessible. Must qualify the allocation with an enclosing instance of type Person (e.g. x.new A() where x is an instance of Person).
问题:抽象类不能当作成员属性来使用,可以定义但是访问不到
解决方法:不要放在类的本身,把抽象类从main方法中拿出来与最上面的类平级