English

When is a constructor invoked? - Computer Applications

Advertisements
Advertisements

Question

when is a constructor invoked?

Short Answer
Short Note

Solution

  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
  Is there an error in this question or solution?
Chapter 7: Constructors - Review Insight [Page 415]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 7 Constructors
Review Insight | Q 9. (ii) | Page 415
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×