In a program there is the line:
this(param);
does it invoke the constructor with the parameter param ?
Yes, it does.
This way a class can have multiple constructors without the need
to duplicate code.
In this example, the first two constructors (with one parameter)
both call the constructor with two parameters.
So the user can choose which constructor to use, but the constructor
with the two parameters is always the one who does the job in the end :
public MyClass(int number)
{
this(number, "empty");
}
public MyClass(String text)
{
this(0, text);
}
public MyClass(int number, String text)
{
myNumber = number;
myText = text;
}