मराठी

While creating a class, a specific method called constructor is defined to initialise the instance variables. Such method may or may not use parameters. - Computer Applications

Advertisements
Advertisements

प्रश्न

While creating a class, a specific method called constructor is defined to initialise the instance variables. Such method may or may not use parameters. In a case where the constructor is not defined in the class, the system creates on its own to put the default initial value to the instance variables. The initial values can also be duplicated from one instance to another. 

Based on the above discussion, answer the following questions:

  1. Which name resembles with the constructor name?
  2. What type of constructor is used with parameters?
  3. What type of constructor initialises the instance variables with default value?
  4. Which constructor is used to duplicate the initial values from one constructor to other? 
घटनेचा अभ्यास

उत्तर

  1. Class name
  2. Parameterised constructor
  3. Default constructor
  4. Copy constructor 
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 7: Constructors - EXERCISES [पृष्ठ ४१८]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
पाठ 7 Constructors
EXERCISES | Q IV. | पृष्ठ ४१८
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×