Is Constructor Overriding Possible?

后端 未结 14 1960
时光说笑
时光说笑 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:10

    Because a constructor cannot be inherited in Java and Method Overriding requires inheritance. Therefore, it's not applicable.

提交回复
热议问题