Is it true that calling this () inside the constructor implicitly calls super ()?
Calling this() in the constructor will invoke the zero-args constructor for this class. If the zero-args constructor for this class does not have an explicit call to super(...) , then yes, there will be an implicit call to the zero-args constructor super() . If the zero-args constructor in your class has an explicit call to some other super signature, then of course this is done instead.
This is true for designers in general. In your class A , since your constructor A(int) does not have a call for this() or super() , implicit super() is executed.
I did not expect the first line in the output of "Top default constructor", since there is no call to super() , implicit or explicit.
Yes, there is - implicit. :-)
The basic rule is this: some base class constructor must be run before the code in the derived class. Therefore, this(...) or super(...) calls must be the first in the constructor. If the constructor does not have an explicit call to super(...) , there is always an implicit call to super() (with no arguments).
source share