2

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,必须分配一个合适的外部类实例以访问内部类。
正确的方式可以是:
在这里插入图片描述

posted @ 2020-01-23 23:24  风吟令  阅读(233)  评论(0编辑  收藏  举报