Why does constructor doesn't have a return type ?

Showing Answers 1 - 1 of 1 Answers

The constructor just return the object itself.

when you call to new you get the object. the new calls to the constructor of the class in order to create the object and the return value from the new is the pointer of the object so this is the return value.

  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