- 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;} |
|