Ask Question
15 October, 10:54

Which of the following statements is true? Constructors:

a) initialize instance variablesb) when overloaded, can have identical argument listsc) when overloaded, are selected by number and types of parametersd) a and c

+4
Answers (1)
  1. 15 October, 11:39
    0
    D) a and c

    Explanation:

    A constructor is a code block that looks like a method (function) which is called when an object's instance is created. However, a constructor differs from a normal method because of the following;

    1. It does not have a return type.

    2. It's name must be same with the class name

    3. They are not members of the class.

    4. They are called automatically whenever an object's instance is created
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Which of the following statements is true? Constructors: a) initialize instance variablesb) when overloaded, can have identical argument ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers