Professional Documents
Culture Documents
Constructor Concept2
Constructor Concept2
2 types-
A] Default Constructor
B] Parameterized Constructor
If you trying to write Super class Constructor in Sub class, then Sub class will
treat that as a method not constructor because name should not match with Sub class
name. And it will give an compilation error that methods does not have return
value. So we should declare as void, then only it will compile.