Constructor is the method which is implicitly created when ever a class is instantiated. Why?

Showing Answers 1 - 9 of 9 Answers

sudhagar

  • Apr 25th, 2006
 

Constructors are class methods that are executed when an object of a given type is created. Constructors have the same name as the class, and usually initialize the data members of the new object

  Was this answer useful?  Yes

Gideon

  • May 25th, 2006
 

because the contructor contains all the methods and properties of the particular class thus having the same name as the class name.

  Was this answer useful?  Yes

Iqbal Basha

  • Oct 25th, 2006
 

Purpose of Constructor is to initialize the member variables, you no need to invoke constructor explicitly, it execute when you create the object. Thus provide the functionality of initialization.

-BASHA G.

  Was this answer useful?  Yes

vct

  • Jan 15th, 2007
 

A default constructor is implicitly created to assign instance data using any assignments provided in the class definition. In this case all instances of the class start out with the same initial values

  Was this answer useful?  Yes

Only default constructor is called automatically and that is to only to zeroed down the data types you have declared in your class,and that is for avoiding initialization error for your class...

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions