| Claim | Verdict |
|---|
| this and super can both be used | False. Only one first statement exists. |
| You can log before calling super | False. The call must come first. |
| super only assigns parent fields | False. It runs the parent constructor. |
| A subclass body can run before the parent | False. Parent always completes first. |
| Overridden methods called from a parent see subclass fields | False. They see type defaults. |
| super reaches any ancestor | False. Only the direct parent. |
| Omitting super skips the parent | False. An implicit call is inserted. |
| Chaining works in a record constructor | False. super is already supplied. |
Frequently Asked Questions
Why must this() or super() be the first statement?
Because a subclass body cannot legally observe a parent object whose constructor has not finished. Rather than allow that, the language makes the delegation syntactically mandatory at the start. The rule is enforced by the compiler, not by convention.
What happens if I write neither this nor super?
The compiler inserts an implicit call to the parent no-argument constructor at the start of the constructor body. This fails at compile time only when the direct parent declares no no-argument constructor, which is a useful early warning rather than a runtime failure.
Can this() and super() appear in the same constructor?
No, because each must occupy the single first-statement position. To delegate to a sibling constructor while still initialising the parent, let the target constructor call super, and move any extra assignment work into a helper method.
In what order do chained constructors execute?
From the top of the hierarchy downward. Every parent constructor, including field initialisers and its own chained calls, completes before the subclass field initialisers run, and those complete before the subclass constructor body. The order is fixed regardless of how the calls are arranged.
Can a parent constructor call a method the subclass overrides?
Yes, and this is legal but dangerous. Method dispatch is dynamic, so the override runs even though the subclass has not initialised yet, and the override observes type defaults rather than assigned values. Mark such methods private, static, or final, or initialise from a factory method.
Does super reach beyond the direct parent?
No. Because Java supports single inheritance, super always refers to the direct superclass. A grandparent is reached only when the parent itself chains upward, and interfaces are never reached through super at all.
Is this() a method call?
No, it is a constructor delegation, and the language treats it specially by requiring the first-statement position. Following the opening parenthesis is what distinguishes it from this.field and this.method, which refer to the current object.
Why can a record constructor not call super?
The compiler has already generated a canonical constructor that invokes the parent no-argument constructor for you. Writing your own would duplicate that call, so the compact constructor form deliberately omits the parameters and forbids explicit chaining.