Which among the following is called first, automatically, whenever an object is created?

Quốc Ân

New member
Which among the following is called first, automatically, whenever an object is created?
A. Class
B. Constructor
C. New
D. Trigger
 
Answer: b
Explanation: Constructors are the member functions which are called automatically whenever an object is created. It is a mandatory functions to be called for an object to be created as this helps in initializing the object to a legal initial value for the class.
 

Tìm kiếm

Back
Top