问题
单项选择题
设有下面两个类的定义: class Person{ long id;// 身份证号 String name://姓名 } class Student extends Person{ int score://成绩 int getScore( ){ return score; } } 则类Person和类Student的关系是( )。
A.包含关系
B.继承关系
C.关联关系
D.无关系
答案
参考答案:B