在一个类的静态方法中,为什么不能直接实例化类中包含的非静态的类。
比如一下代码:
CChild c=new CChild()的时候报错。
No enclosing instance of type Hello is accessible. Must qualify the allocation with an enclosing
instance of type Hello (e.g. x.new A() where x is an instance of Hello).
必须要把 CChild 改为静态类或者 从新wrappe 一个方法来调用CChild 的方法。