在main函数中创建新对象时出错 No enclosing instance of type ooo is accessible. Must qualify the allocation with a_静态成员
错误原因:No enclosing instance of type ooo is accessible. Must qualify the allocation with an enclosing instance of type ooo (e.g. x.new A() where x is an instance of ooo).

方法
方法一:分为两个class 不用内部类

方法二:给内部类加个static,因为main方法是静态的。

在一个类的静态成员中去访问非静态成员之所以会出错是因为在类的非静态成员不存在的时候静态成员就已经存在了,访问一个内存中不存在的东西当然会出错。

在main函数中创建新对象时出错 No enclosing instance of type ooo is accessible. Must qualify the allocation with a_内部类_02