請說明代碼,無法理解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); }}
無法理解.this關(guān)鍵字在此代碼中的使用
繁華開滿天機(jī)
2021-04-29 09:38:56