请说明代码,无法理解main()方法中的test(3).x是什么意思
class Test {
int x=0;
static int y=1;
Test(){
this.y++;
this.x+=++x;
}
Test(int x){
this();
System.out.println(x+this.x+this.y);
}
}
public class MyClass {
public static void main(String args[]) {
System.out.println(new Test(3).x+" "+new Test(4).y);
}
}
侃侃无极
相关分类