No enclosing instance of type Stu is accessible

No enclosing instance of type Stu is accessible. Must qualify the allocation with an enclosing instance of type Stu (e.g. x.new A() where x is an instance of Stu).


根据提示,没有可以访问的实例 SxtStu,必须分配一个合适的外部类实例以访问内部类。
正确的方式可以是:
在这里插入图片描述

猜你喜欢

转载自www.cnblogs.com/hycc/p/12231676.html