[单选题]

类A定义如下: class A { private int x=10; int getx() { return x;} } class B extends A { private int x=15; //需要覆盖getx()方法 } 在下述方法中可以在类B中覆盖getx()方法的是 ( )

A.int getx(){…}

B.int getx(float f){…}

C.float getx(){…}

D.double getx(float f){…}

参考答案与解析: