No enclosing instance of type Stu is accessible

时间:2022-02-18 02:27:48

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,必须分配一个合适的外部类实例以访问内部类。
正确的方式可以是:
No enclosing instance of type Stu is accessible