danteF9827 danteF9827
  • 21-08-2019
  • Computers and Technology
contestada

What is a constructor? Why would you include a constructor in a class?

Respuesta :

Cetacea
Cetacea Cetacea
  • 26-08-2019

Answer:

Constructor in the class is the member function that gets into action when any new object gets created in the class ,it gets invoked. It does not have any return type and no void return.

The constructor is used in the class because there is the requirement for the initializing of the new object and then only object can do the functioning in the program.

Answer Link

Otras preguntas

67 is 49%of what number
By observation, what is the solution to this system? O (-1,0) O (1, 0) O (0, 1) O (0, -1)
someone help me with this please, which word makes the sentence make sense?
A restaurant offers three sizes of coffee and four differerſt types of coffee. Coffee can be ordered with or without cream and with or without sugar. The restau
The trial of former President Trump will begin on what day?
PLEASE HELP I GIVE A DECENT AMOUNT OF POINTS !!The circumference of the outside of a ring is 66 mm, and it has an outer diameter of 21 mm. If the circumference
A farmer keeps his piglets in small pens and they have become aggressive towards one another. He gives the piglets large doses of antibiotics every day to preve
what is 300x21444444
do you see a pattern or a possible shortcut to simplify more quickly?
I need help please !!!!!!!!