Home | | Computer Science 11th std | Characteristics of Constructors

Computer Science - Characteristics of Constructors | 11th Computer Science : Chapter 14 : Classes and objects

Chapter: 11th Computer Science : Chapter 14 : Classes and objects

Characteristics of Constructors

The name of the constructor must be same as that of the class

Characteristics of Constructors

 

• The name of the constructor must be same as that of the class

 

• No return type can be specified for constructor

 

• A constructor can have parameter list

 

• The constructor function can be overloaded

 

• They cannot be inherited but a derived class can call the base class constructor

 

• The compiler generates a constructor, in the absence of a user defined constructor.

 

• Compiler generated constructor is public member function

 

• The constructor is executed automatically when the object is created

 

• A constructor can be used explicitly to create new object of its class type

 

Tags : Computer Science , 11th Computer Science : Chapter 14 : Classes and objects
Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
11th Computer Science : Chapter 14 : Classes and objects : Characteristics of Constructors | Computer Science

Related Topics

11th Computer Science : Chapter 14 : Classes and objects


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.