When does the compiler supply a default constructor for a class

The compiler supplies a default constructor for a class if no other constructors areprovided.

Showing Answers 1 - 6 of 6 Answers

dpsharma

  • Jun 15th, 2009
 

Compiler provides default constuctor only if there is any no argument constructor present in the super class. If super class has no constructor explicitly defined then also compiler provides default constructor for sub class.

  Was this answer useful?  Yes

Suzal Bajrachraya

  • May 2nd, 2016
 

The answer is quite unclear. Can you please go in depth a bit.
Or, Even conscider a code snippet if possible!
Thank you!

  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