本帖最后由 大漠孤星 于 2015-9-22 23:53 编辑
class Demo1{
{ x = 2;
}
int x =1;
{
x = 3;
}
public Demo1(){
this.x = 4;
}
public Demo1(int x){
this();
}
public void showX(){
int x = 5;
System.out.println(this.x + x);
}
public static void main(String [] args){
new Demo1(5).showX();
}
}
求打印出来的值?
|
|