Multiple choice technology programming languages

If a constructor uses this, it must not be in the constructor's first line

  1. True

  2. False

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

When a constructor uses this() to call another constructor, it MUST be the first statement in the constructor body. This ensures initialization happens in the correct order - you can't do other work before delegating to another constructor. If it's not first, the compiler will generate an error.