weibo_慕设计2421235
2018-11-25 18:19
public class Outer {
private String name= "你好!";
public void show() {
class Inner{
int year=2018;
public int newYear() {
return year+1;
}
}
Inner i=new Inner();
int newyear=i.newYear();
System.out.println(name +newyear);
}
public static void main(String[] args) {
Outer o=new Outer();
o.show();
}
}
运行后是这样的
Error occurred during initialization of boot layer
java.lang.module.FindException: Error reading module: C:\Users\Administrator\Workspaces\MyEclipse CI\Lei\bin
Caused by: java.lang.module.InvalidModuleDescriptorException: Outer$1Inner.class found in top-level directory (unnamed package not allowed in module)
几个意思?
是因为包名的问题吗? 在前边指定个包名试试
Java入门第二季 升级版
530559 学习 · 6091 问题
相似问题