Question 6
Back to Exercise
On Java 21, where must a this(...) call appear?
- A Anywhere in a method
- B As the first statement of a constructor Correct
- C As the last statement of a constructor
- D Only in static blocks
Correct Answer: Option B
And a constructor cannot contain both this(...) and super(...).
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!