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 [पृष्ठ ४१८]