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{}
相关文章推荐
- - No enclosing instance of type Test is accessible. Must qualify the allocation with an enclosing in
- - No enclosing instance of type Test is accessible. Must qualify the allocation with an enclosing in
- No enclosing instance of type Test is accessible. Must qualify the allocation with an enclosing inst
- 【Java-bug】No enclosing instance of type Test is accessible. Must qualify the allocation with an encl
- java编译错误No enclosing instance of type TestFrame is accessible. Must qualify the allocation with an enclosing instance of type TestFrame (e.g. x.new A(
- No enclosing instance of type test is accessible. Must qualify the allocation with an enclosing inst
- Java出现No enclosing instance of type Test is accessible. Must qualify the allocation with an enclosin
- 错误提示:No enclosing instance of type A is accessible. Must qualify the allocation with an enclosing
- Java出现No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing
- Java编译时出现 No enclosing instance of type Main is accessible. Must qualify the allocation with an encl
- No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing insta
- Java出现No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing
- 【转】Java中No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing
- Java出现No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing
- No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing
- No enclosing instance of type E is accessible. Must qualify the allocation with an en
- Java出现No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing
- Java出现No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing
- Java出现No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing
- Java编译错误“No enclosing instance of type AA is accessible. Must qualify the allocation with an enclosing instance of type SimpleTh