在这个程序中,'Car'类被定义为'Vehicle'类的子类。

In this program, the 'Car' class is defined as a subclass of the 'Vehicle' class.

点击显示答案

In this program, the 'Car' class is defined as a subclass of the 'Vehicle' class.

subclass 是由前缀 sub-(表示"在...之下"或"次级")和 class(类)组成的复合词。sub- 表示从属关系,class 指编程中的"类"。 subclass 在面向对象编程中特指"子类",即继承自另一个类(父类)的类,会继承父类的属性和方法。

在 App 中完整学习这张卡片

在 App 中学习