हिंदी

When is a constructor invoked? - Computer Applications

Advertisements
Advertisements

प्रश्न

when is a constructor invoked?

लघु उत्तरीय
टिप्पणी लिखिए

उत्तर

  1. A constructor is invoked as soon as the object is created to initialize the object.
  2. E.g., Car hybrid = new Car();
  3. In the above example, Car() is invoking a default constructor. 
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 7: Constructors - Review Insight [पृष्ठ ४१५]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 7 Constructors
Review Insight | Q 9. (ii) | पृष्ठ ४१५
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×