Is Constructor Overriding Possible?

后端 未结 14 1947
时光说笑
时光说笑 2020-12-08 00:31

What i know is, the compiler writes a default no argument constructor in the byte code. But if we write it ourselves, that constructor is called automatically. Is this pheno

14条回答
  •  天命终不由人
    2020-12-08 01:34

    Your example is not an override. Overrides technically occur in a subclass, but in this example the contructor method is replaced in the original class.

提交回复
热议问题