DEV Community

Discussion on: Calling super() - [OOP & Java #12]

Collapse
 
tlylt profile image
Liu Yongliang

Hi,
Thank you for your kind comment!
For this part that you are referring to:

Thus, if the first statement in a constructor does not explicitly invoke another constructor with this() or super(), Java implicitly inserts the call super(); that is, it calls the superclass constructor with no arguments. If the superclass does not have a constructor that takes no arguments, this implicit invocation causes a compilation error.

I think I was trying to say that as opposed to something being done explicitly by the author of the code (writing and calling super()):

  • Java "implicitly" calls super() and this "implicit" invocation causes a compilation error.

I agree that perhaps "implicit" isn't the best way to describe it here but I am glad that you get the point:)