In this simple case, we cannot see a real advantage of the one or the other one solution.
But as a general rule I prefer the solution where the constructor calls the other constructor as it avoids to repeat yourself.
Suppose in the constructor you add two or three arguments and that you perform some processings. You should probably duplicate it in the constructor without parameter.
For example with duplication in constructor:
class Student {
int units;
int otherUnits;
boolean isTrue;
Student() {
this.units = 10;
this.otherUnits = 20;
this.isTrue = true;
computeIntermediaryValue(units,otherUnits,isTrue);
}
Student(int units, int otherUnits, boolean isTrue) {
this.units = units;
this.otherUnits = otherUnits;
this.isTrue = isTrue;
computeIntermediaryValue(units,otherUnits,isTrue);
}
}
Undesirable duplication should be avoid.
Without duplication in constructor it looks better:
class Student {
int units;
int otherUnits;
boolean isTrue;
Student() {
this(10, 20, true);
}
Student(int units, int otherUnits, boolean isTrue) {
this.units = units;
this.otherUnits = otherUnits;
this.isTrue = isTrue;
computeIntermediaryValue(units,otherUnits,isTrue);
}
}