Within the class we can write any number of constructors with different argument types.
Why need overloaded constructor?
If need to search student record by student name + id or only with student name.
Inheritance concept is applicable for Constructors?
This concept is not applicable. By default parent class constructor is not available to child class. As parent
constructor is not available by default, so inheritance not applicable to constructor.
Why interface not support constructor?
Constructor not applicable to interface as by default all instance member of interface is public static final.
Abstract class support constructor?
Abstract class can have constructor to perform initialization of instance variable. Abstract class constructor
executed only when child class object is created as abstract class cannot create object.
[Link]/in/sharfuddin-ahamed/
This document just learning purpose, taken from a video lesson
Internal concept of constructor
If parent class contains argument constructor while writing child classes, please make sure corresponding
constructor should be available or not. So before writing child constructor a special care needs to be taken.
Whenever we writing augmented constructor in any class or parent class and not want to give risk for child
class, it is highly recommended to take no-augmented constructor also, then always matched constructor
available even child constructor not written.
[Link]/in/sharfuddin-ahamed/
This document just learning purpose, taken from a video lesson