1.

Which among the following is called first, automatically, whenever an object is created?(a) Class(b) Constructor(c) New(d) TriggerI had been asked this question in class test.My enquiry is from Constructors in portion Constructors and Destructors of Object Oriented Programming

Answer»

Correct choice is (B) Constructor

The best explanation: Constructors are the MEMBER functions which are called automatically WHENEVER an object is created. It is a mandatory functions to be called for an object to be created as this helps in initializing the object to a LEGAL initial value for the class.



Discussion

No Comment Found

Related InterviewSolutions