這樣可以嗎?為什么會報錯?
public class HelloWorld {
? ??
? ? public class Inner {
? ? ? ??
public void show() {
System.out.println("welcome to imooc!");
}
}
}
class ?Java{ ?
public static void main(String[] args){?
? ? ? ??
? ? ? ? HelloWorld.Inner i=new HelloWorld().Inner();
i.show();
}
}
2015-03-28
? HelloWorld.Inner i=new HelloWorld().Inner();
helloworld后面的括號去掉