Within the same class, we use the “this()” method to call one constructor from another. We call the appropriate “this()” method based on the number of parameters we pass.
There are two restrictions for using the “this()” method:
- The “this()” method must be the first statement in the constructor.
- We cannot use two “this()” methods in the constructor.