Advertisements
Advertisements
प्रश्न
Explain the following term:
Parameterised constructor
लघु उत्तरीय
उत्तर
- A parameterized constructor is a member method with the same name as the class. It can initiate instance variables with the parameters supplied when constructing an object.
- Example: Employer em = new Employer(3, 6, 14);
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 7: Constructors - EXERCISES [पृष्ठ ४१८]