nandha gopal Apr 13th, 2006 The constructor is getting called when ever the object for the class is created.In java or c++ the object is created like as followsclass A{//some code}//class endsin java A obj = new A();in c++ A obj; .giving return type for a constructor is an syntax error.There is no place holder for capturing the return value.
sivanesh.a Profile Answers by sivanesh.a Questions by sivanesh.a Dec 24th, 2006 they have implicit return
Why constructors don't have return type?
Profile Answers by ratna_ponnapalli Questions by ratna_ponnapalli
Questions by ratna_ponnapalli answers by ratna_ponnapalli