Java Program to Show Inherited Constructor Calls Parent Constructor By Default
In java, there exists a very important keyword known as super() keyword in java which is widely used in java being object-oriented and hence inheritence comes into play. So whenever we use super keyword inside a child constructor then it calls the default parent constructor by itself.
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.
I am parent class constructor I am child class constructor I am parent class constructor
I am parent class constructor I am child class constructor I am parent class constructor I am param child class constructor