50,523
社区成员
发帖
与我相关
我的任务
分享
public class Test{
public Test(){
this(test);
}
public Test(String s){
//
}
}
public class Demo {
private String name;
public Demo() {}
public Demo(String name) {
this(); // 调用空参的构造器来构造出对象,再对其name进行赋值
this.name = name;
}
}