हिंदी

Differentiate Between Constructor and Function.

Advertisements

प्रश्न

Differentiate between constructor and function.

अंतर स्पष्ट करें
Advertisements

उत्तर

Constructors must be named with the same name as the class name. They cannot return anything, even void (the object itself is the implicit return).
Functions must be declared to return something, although it can be void.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2016-2017 (March) Set 1
Advertisements
Share
Notifications



      Forgot password?
Use app×