← Quiz: Object Initialization Order: all 10 questions
Quiz: Object Initialization Order · Question 6 of 10
Where must this(...) or super(...) appear inside a constructor?
Where must this(...) or super(...) appear inside a constructor?
- A.Anywhere in the body
- B.At the end
- C.As the first statement
- D.Only in static methods
Answer & explanation
Correct answer: As the first statement
This is the classic rule tested in exams (Java 25 allows limited statements before it that do not touch the object).
Can you get the rest right without peeking?
Take the timed Quiz: Object Initialization Order quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →