HelloWorld 在這個(gè)show()方法里面不能用o代替嗎?
public void show() {?
System.out.println("外部類(lèi)中的name:" + ?HelloWorld.this.name );
System.out.println("內(nèi)部類(lèi)中的name:" + name ? ? ? ? ? ? ? ? );
System.out.println("外部類(lèi)中的age:" + age);
}
}
已經(jīng)在main函數(shù)里面創(chuàng)建外部對(duì)象時(shí),將o代替了HelloWorld???為什么運(yùn)行就說(shuō)不行
2015-01-17
沒(méi)問(wèn)題 HelloWorld的類(lèi)的作用域比 main大 把你不好使的代碼貼上來(lái) 我看下
2015-01-17
應(yīng)該在外面 作用域不對(duì)