public Student(int age){
super();
this.age = age;
}
public Student(String name , int age){
/*
super(); 注意,这里不能再调用super();因为下边的this(age);调用了上方的构造器,已经存在了
super();该构造器内不能再次调用。所以只写一个this(age)就够了;
*/
this(age);
this.name = name;
}
其他的小细节:
构造方法体内调用父类构造器( super(); )或重载构造器( this(); )时,应放在方法体内的第一行。