【单选题】请先阅读下面的代码 public class Test { public Test(){ } public Test(int x){ this(); } public Test(boolean b){ this(1); } public static void main(String[] args) { Test test = new Test(true); } } 上面程序的运行结果为下列哪一项...
【单选题】请先阅读下面的代码 public class Test { public Test(){ System.out.println("构造方法一被调用了"); } public Test(int x){ this(); System.out.println("构造方法二被调用了"); } public static void main(String[] args) { Test test = new ...
【单选题】请先阅读下面的代码 public class Test { public Test(){ System.out.println("构造方法一被调用了"); } public Test(int x){ this(); System.out.println("构造方法二被调用了"); } public static void main(String[] args) { Test test = new ...