Which method is invoked automatically with creation of an object ?(a) Instance method
(b) Constructor(c) Class method
(d) All of the above
Answers
Answered by
1
Hii
Q:- Which method is invoked automatically with creation of an object ?(a) Instance method
(b) Constructor(c) Class method
(d) All of the above
Ans:- Constructor
Q:- Which method is invoked automatically with creation of an object ?(a) Instance method
(b) Constructor(c) Class method
(d) All of the above
Ans:- Constructor
Answered by
0
When an object is created function constructor is automatically called.
- For new objects, the initialization is done by the constructor.
- The constructor makes the object ready to perform the assigned operations.
- The values assigned to the objects by the constructor can be either user-given or default values.
- The Constructor and the class share the same name.
- The main purpose of the constructor is to make the object ready.
Similar questions
Math,
8 months ago
Math,
8 months ago
English,
8 months ago
Computer Science,
1 year ago
Social Sciences,
1 year ago
History,
1 year ago
Computer Science,
1 year ago