Multiple choice

Which of the following statements is/are correct in Java? A. Constructors do not have any return type. B. Constructors cannot be private.

  1. Only A

  2. Only B

  3. Both A and B

  4. Neither A nor B

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Both are the properties of a constructor. A constructor does not have any return type and cannot be declared as private.