您的位置:首页 > 其它

No enclosing instance of type Test_02_1 is accessible. Must qualify the allocation with an enclosing

2017-12-17 13:15 1246 查看




main是Test_02_1类的static方法,按照常理它只能访问Test类中static资源,而class A是非static所以报错了。解决方法很简单,给class A添加static属性就可以了。

static class A{}

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐