1.

What is constructor ? When is it invoked ?

Answer»

A constructor is a special method which is called automatically as soon as the object is created to initialize the object. They has no return type not even void. It has the same name as the class name. A constructor is invoked as soon as the object is created to initialize the object.



Discussion

No Comment Found

Related InterviewSolutions