What is Constructor ?

A constructor is a special method that is created when the object is created. This particular method holds the same name as that of the object and it initialises the instance of the object whenever that object is created. The constructor also usually holds the initialisations of the different declared member variables of its object. Constructor does not return a value.

Post a Comment

0 Comments