Multiple choice

Which of the following statements is false about constructors in Java?

  1. Constructors do not have return type.

  2. Constructor has the same name as that of the class.

  3. Constructors are called automatically upon object creation time.

  4. A constructor can be static.

  5. A constructor cannot be final.

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

No, a constructor cannot be a static. If it is static, then it is accessible within the class only but not by subclass as static variables are class variables.