I don't understand this part in Oracle docs?

前端 未结 4 1240
太阳男子
太阳男子 2021-01-23 10:41

Hi I am Ankur and have been coding with java for few years now..I have read Head first Java The Complete Reference by Herbert Schildt earlier and recently I came across a major

4条回答
  •  不知归路
    2021-01-23 11:31

    The compiler also adds the default constructor to any class which doesn't declare any. If your superclass declares another constructor besides the default one, and if you then comment out the default constructor, you will get the compiler error.

提交回复
热议问题