Ask Question
23 June, 05:30

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

+3
Answers (1)
  1. 23 June, 09:12
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers