Given:
What is the output?
Java inserts an implicit super() call as the first statement of each constructor when no explicit constructor invocation is written. Creating C therefore runs A's constructor, followed by B's constructor, and finally C's constructor, producing A B C.
super()
C
A
B
A B C
Community Discussion