Advertisements
Advertisements
प्रश्न
Explain the following term:
Constructor with default argument
लघु उत्तर
उत्तर
- A default constructor initializes instance variables with default values. When no program defines a constructor, the compiler builds one automatically. When a class object is formed, this constructor sets the instance variables to system-approved default values.
- For example, Employer em = new Employer();
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 7: Constructors - EXERCISES [पृष्ठ ४१८]