Subclasses don’t inherit the constructor from the superclass
We need to make a constructor for each subclass, or use a default constructor generated by Java. Subclasses also need to call the parent constructor, so that there is an object of superclass too.
we do this like this:
public class Student extends Person{
private int grade;
private double gpa;
public Student(String name, String birthday, int grade, double gpa) {
super(name, birthday)
this.grade = grade;
this.gpa = gpa;
}
}to call a superclass constructor, the super keyword is used. you pass in the required parameters for doing a constructor of the superclass. In this instance, name and birthday are passed to the person class’s constructor, while grade and gpa are handled by the student class.

if a subclass doesn’t explicitly call the superclass constructor using super, java implicitly inserts a call to the superclass’s no argument constructor. if a no argument constructor does not exist, then the program will not compile without an explicit call to a constructor.
When we have multiple superclasses, all constructors must be satisfied.
The “Object” class sits at the top of the class hierarchy for all objects an becomes the default superclass when an object doesn’t explicitly extend another class.