1.constructor name should be same as the class name
2.constructor cannot have any return type not even void return type
3.constructor is executed automatically during object creation
4.constructor with return type is considered as user defined method
5.Even through constructor does not have return type we can write empty return type
6.Constructor can have any access specifier private,public default and protected
7.If all constructor in a class are declared has private it blocks the inheritance
8. constructor can call another constructor of same class using this keyword
this keyword should be first statement
9.super class constructor can be accessed using super keyword
10. constructor can't be overridden
11. constructor are not inherited
12.constructor can be overloaded
2.constructor cannot have any return type not even void return type
3.constructor is executed automatically during object creation
4.constructor with return type is considered as user defined method
5.Even through constructor does not have return type we can write empty return type
6.Constructor can have any access specifier private,public default and protected
7.If all constructor in a class are declared has private it blocks the inheritance
8. constructor can call another constructor of same class using this keyword
this keyword should be first statement
9.super class constructor can be accessed using super keyword
10. constructor can't be overridden
11. constructor are not inherited
12.constructor can be overloaded
Comments
Post a Comment