为什么在STATIC 方法中不能用this.
如
public class outer{
public static void main(String[] args){
inner a = new inner();// not right?
outer.inner b = new outer().inner();//只能 这样实例化
//一个inner class对象
}
class inner{}
public void method(){
inner a = new inner();//right
}
}
为什么在STATIC 方法中不能用this.???????
如
public class outer{
public static void main(String[] args){
inner a = new inner();// not right?
outer.inner b = new outer().inner();//只能 这样实例化
//一个inner class对象
}
class inner{}
public void method(){
inner a = new inner();//right
}
}
为什么在STATIC 方法中不能用this.???????
对象可以理解为一个实例吧? 梦幻西游-湖北1区-昭君台-ID:9114273
或者 http://community.csdn.net/