 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can implement default constructor in inheritance. Before starting, you can note my information which is available in front of you. If you want to subscribe my YouTube channel, you can click on the link which is available at bottom right corner of this video. You can download my app Takimis that is available on Google Play. Now coming on to the topic, for demonstration, I am going to implement a sample code in front of you. First is class A. Inside this class, I am implementing default constructor. Inside this constructor, I am implementing a statement system.out.println. It will show constructor of A on console. While I am going to execute this, then I am implementing class B. It extends class A. Now I am implementing default constructor for class B. In this constructor, system.out.println statement is available which will display constructor of B on console. Now for object creation, I am creating class test. Inside class test, I am implementing main method. Here in main method, I am going to create object of class B. Now whenever I will be executing this code and object will be created, it will call constructors of class B and class A. Now you have to remember that whenever we create an object of subclass, then constructor of subclass is called first, then control will be transferred to superclass constructor. Then execution of superclass constructor will be done and then execution of subclass constructor will be done. So for calling purpose, hierarchy moves from subclass to superclass. But for execution, hierarchy moves from superclass to subclass. So in short, you can say that constructor of superclass is executed first and constructor of subclass is called first. Now we can see the output with the help of execution. I am executing this code and you can see the output. Constructor of A and constructor of B. Both outputs are displayed in front of you. Output of constructor A is shown first and then output of constructor B is shown at second. So you might have understood that execution of superclass constructor is done first and then subclass constructor will be executed. If you implement hierarchical inheritance for more than two classes, then the same scenario will be applicable for that purpose also. So implement this code in your system so that you can understand how we can call default constructor in case of inheritance. If you want to watch more programming related videos, you can subscribe my YouTube channel. If you want to connect with me, you can follow my details which are available in front of you. Thank you for watching this video.