Multiple choice technology programming languages

If a constructor uses super, it must use it in the first line; otherwise, the compiler will complain.

  1. True

  2. False

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

When a constructor uses super() to call the parent class constructor, it MUST be the first statement. This ensures the parent class is properly initialized before the child class does its own initialization. The compiler enforces this rule and will complain if super() is not first.