-->
当前位置:首页 > 题库 > 正文内容

单选题:设有下面两个类的定义,类 Person 和类 Student 的关系是( )。

Luz4年前 (2021-11-15)题库900
设有下面两个类的定义,类 Person 和类 Student 的关系是( )。

class Person {
long id; // 身份证号
String name; // 姓名
}
class Student extends Person {
int score; // 入学总分
int getScore(){
return score;
}
}




A.包含关系


B.实现关系


C.继承关系


D.没有关系




答案:C

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。