English

Explain the following term: Parameterised constructor - Computer Applications

Advertisements
Advertisements

Question

Explain the following term:

Parameterised constructor

Short Answer

Solution

  1. 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.
  2. Example: Employer em = new Employer(3, 6, 14); 
shaalaa.com
  Is there an error in this question or solution?
Chapter 7: Constructors - EXERCISES [Page 418]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 7 Constructors
EXERCISES | Q V. 4. (b) | Page 418
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×