本帖最后由 て淡莣了陌生 于 2013-4-27 06:47 编辑
package cn.itcast;
public class Demo {
public static void main(String[] args) {
Outer out = new Outer();
out.show();
}
}
class Outer{
public void show(){
final int age = 33;
class Inner{
public void print(){
System.out.println(age);
}
}
Inner in = new Inner();
in.print();
}
}
这段代码在eclipse中一直提示找不到Outer这个类(The type Outer is already defined),到底是哪里错了啊,真郁闷了,谁能指教一下,谢谢了! |