java 出现No enclosing instance of type Test1 is accessible. Must qualify the allocation with an enclos
来源:互联网 发布:移动网络优化工程师 编辑:程序博客网 时间:2024/05/16 12:48
大概情况就是这样一段代码报错,查找资料解决,这里记录一下
public class Test1 { class A{ } public static void main(String[] args) { /** *报错: No enclosing instance of type Test1 is accessible. Must qualify the allocation with an enclosing instance of type Test1 (e.g. x.new A() where x is an instance of Test1). */ A a =new A();//这里报错,把A 改下 static 的就可以 }}
参考
非常感谢
http://blog.csdn.net/sunny2038/article/details/6926079
阅读全文
0 0
- java 出现No enclosing instance of type Test1 is accessible. Must qualify the allocation with an enclos
- No enclosing instance of type FactoryModel is accessible. Must qualify the allocation with an enclos
- No enclosing instance of type AddressDemo1 is accessible. Must qualify the allocation with an enclos
- No enclosing instance of type TextRunnable is accessible. Must qualify the allocation with an enclos
- Java出现No enclosing instance of type ImageViewer is accessible. Must qualify the allocation with an
- 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
- 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
- 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 * 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
- 响应式Web设计:HTML5和CSS3实战(读书笔记)
- REST简介
- 事件冒泡
- Kafka+Storm+HDFS整合实践
- SQL server 除法计算百分比
- java 出现No enclosing instance of type Test1 is accessible. Must qualify the allocation with an enclos
- _matroska_decode_buffer in
- 卡特兰数——洛谷 P1375 小猫
- 离散动态贝叶斯网络
- 指针强制转换and字节序导致的问题
- EngineerCMS—基于beego框架的工程师知识管理系统—数据库自动备份
- PuTTY (5) SSH VS Telnet
- Teleport Ultra/Teleport Pro的冗余代码批量清理方法
- UIWebView 页面处理