Doesn't the compiler always make a no-arg constructor for you?

Questions by krishna_darl   answers by krishna_darl

Showing Answers 1 - 3 of 3 Answers

kalya

  • May 22nd, 2006
 

No. when there is user-defined parametrized constructor, then the compiler will not make a no-arg. constructor.

  Was this answer useful?  Yes

ramesh chandra

  • Jan 2nd, 2007
 

hi

there wil be always a default constructor raised with no arguements

  Was this answer useful?  Yes

Compiler provides a no-arg constructor when don't specify any constructor in your class. If you do provide a constructor (with or without args), it will expect you only to fill in the no-arg constructor and it won't provide one.

  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.