构造函数之间调用只能用this关键字,通过参数区分所调用的构造函数
可以这样理解: this.age中的this为this关键字,而this(age)中的this为this语句,它起到调用函数的作用.the example:
private String name;
private int age;
public TestConstructor(String name){
this.name=name;
}
public TestConstructor(int age,String name){
this(name);
this.age=age;
}