The second usage of super

1.super.
Used in methods and constructors in subclasses, representing access to properties and methods of parent classes.

2.super.
Attribute: Access the attribute in the parent class.

3.super. Method name (argument): Access the method in the parent class.

Example:
在这里插入图片描述

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐