这个错误提示意味着在创建一个内部类对象时,没有给它提供外部类对象的引用。解决方法是使用外部类对象的引用来创建内部类对象,例如:x.new A(),其中x是Person类的一个实例。

No enclosing instance of type Person is accessible Must qualify the allocation with an enclosing instance of type Person eg xnew A where x is an instance of Person什么意思

原文地址: https://www.cveoy.top/t/topic/fNfa 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录