sportsseolive7974 sportsseolive7974
  • 21-01-2020
  • Computers and Technology
contestada

A constructor: A. always accepts two arguments B. has return type of void C. has the same name as the class D. always has an access specifier of private

Respuesta :

flightbath flightbath
  • 22-01-2020

Answer:

Option (C)

Explanation:

A constructor is distinguished from other member functions of the class by having the same name as of its class. Otherwise, it will not be called a constructor. A constructor can have 0 or more passing arguments. A constructor never returns anything as they are used for default initialization of the variables of a class. Also, a private constructor cannot be instantiated so it is very rare for a constructor to be private.

Answer Link

Otras preguntas

Which of the following can sine squared theta over the quantity 1 plus cosine theta end quantity be simplified to?
fossil fuel in a sentence biomass in a snentence
3x+5y= -9 Y= 2x-7 Use substitution to solve the system
At a real estate agency, an agent sold a house for $382,000. The commission rate is 5.5% for the real estate agency. The commission for the agent is 30% of the
Which of the following is an example of absolute chronology?
What is the shortest time it takes it to collect a container of water?
Why does Sylvia choose not to tell the ornithologist about the white heron? What can you infer about Sylvia’s values based on this choice? Use specific examples
What is the value of the expression 9/14÷(−0.6×2)?
It refers to the score that occurs the most
There are 1560 students enrolling at Green Woods middle school. If 85% of the students ride the bus, how many do not ride the bus