Java 程序报错“No enclosing instance of type AA is accessible. Must qualify the allocation with an enclo”
2016-11-04 00:00
627 查看
今天来兴,想看看Java编程,写个小demo,总是出现错误,后来查资料发现:
创建的内部类是动态内部类,main方法是一个静态static方法,在其中new创建一个对象时总是报错,解决方法是:将动态内部类改为静态的,或者不在静态方法中创建动态类。
创建的内部类是动态内部类,main方法是一个静态static方法,在其中new创建一个对象时总是报错,解决方法是:将动态内部类改为静态的,或者不在静态方法中创建动态类。
相关文章推荐
- Java编译错误“No enclosing instance of type AA is accessible. Must qualify the allocation with an enclosing instance of type SimpleTh
- Java编译错误“No enclosing instance of type AA is accessible. Must qualify the allocation with an enclosi
- Java编译错误“No enclosing instance of type AA is accessible. Must qualify the allocation with an enclosing instance of type SimpleT
- Java编译错误“No enclosing instance of type AA is accessible. Must qualify the allocation with an enclosing instance of type
- Java编译错误“No enclosing instance of type AA is accessible. Must qualify the allocation with an enclosi
- Java编译错误“No enclosing instance of type AA is accessible. Must qualify the allocation with an enclosing instance of type SimpleTh
- Java编译错误“No enclosing instance of type AA is accessible. Must qualify the allocation with an enclosing instance of type SimpleT
- Java编译错误“No enclosing instance of type AA is accessible. Must qualify the allocation with an enclosing instance of type SimpleT
- Java编译错误“No enclosing instance of type AA is accessible. Must qualify the allocation with an enclosing instance of type SimpleTh
- [Java]Error:No enclosing instance of type E is accessible. Must qualify the allocation with an enclo
- Java编译错误“No enclosing instance of type AA is accessible. Must qualify the allocation with an enclosing instance of type SimpleTh
- Java编译错误“No enclosing instance of type AA is accessible. Must qualify the allocation with an enclosing instance of type SimpleTh
- 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-bug】No enclosing instance of type Test is accessible. Must qualify the allocation with an encl
- 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 E is accessible. Must qualify the allocation with an enclosing