關(guān)于內(nèi)部類
System.out.println("外部類中的name:" + ? ? HelloWorld.this.name ? ? ? ? ? ? );
為什么不能寫成System.out.println("外部類中的name:" + ? ? o.this.name ? ? ? ? ? ? );
System.out.println("外部類中的name:" + ? ? HelloWorld.this.name ? ? ? ? ? ? );
為什么不能寫成System.out.println("外部類中的name:" + ? ? o.this.name ? ? ? ? ? ? );
2015-06-03
舉報(bào)
2015-06-03
你是在內(nèi)部類里面調(diào)用的吧?如果你在內(nèi)部類里面調(diào)用的話,用對(duì)象,你還要把類實(shí)例化了,直接用類多簡(jiǎn)單