Get Answers to all your Questions

header-bg qa

Write four characteristics of constructor function used in a class.

Answers (1)

best_answer

(i) There is no return type in a constructor function.
(ii) Name of class and constructor is the same.
(iii) we can call constructors while we are creating objects.
(iv) Default constructor is invoked if there is no constructor declared in a class.

Posted by

Deependra Verma

View full answer