One constructor can call another constructor of the class with respect to the current class object. Constructor chaining can be performed inside the same with the help of this keyword.
Example:
public class student
{
int id;
String name;
public student(int id)
{
this.id=id;
}
public student(int id, String name)
{
this(id);
this.name=name;
}
public static void main(String[] args)
{
student s = new student(3, " Ram");
System.out.print("The student id" + id + "and name is" + name);
}
}