super() in Java

前端 未结 15 2308
逝去的感伤
逝去的感伤 2020-11-22 05:36

Is super() used to call the parent constructor? Please explain super().

15条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 05:55

    I have seen all the answers. But everyone forgot to mention one very important point:

    super() should be called or used in the first line of the constructor.

提交回复
热议问题