标题: 求助一道题??? [打印本页] 作者: MartinYu 时间: 2016-7-1 23:10 标题: 求助一道题??? class BaseClass {
Private float x = 1.0f ;
protected float getVar ( ) { return x;}
}
class Subclass extends BaseClass {
private float x = 2.0f;
//insert code here
}
复制代码
Which two are valid examples of method overriding? (Choose Two)
A. Float getVar ( ) { return x;}
B. Public float getVar ( ) { return x;}
C. Float double getVar ( ) { return x;}
D. Public float getVar ( ) { return x;}
E. Public float getVar (float f ) { return f;}