【单选题】有如下程序段:public class Parent {public int addValue (int a,intB){int s;s=ab;return 3;}}
A.
有如下程序段: public class Parent { public int addValue (int a,intB){ int s; s=a+b; return 3; } } class Child extends Parent {} 则下列选项中,可以正确加入类Child中且父类的方法不会被覆盖的是( )。 A.int addValue (int a,intB){//do something...}
B.
public void addValue() {//do something...}
C.
public int addValue (int a,intB)throws MyException {//do something...}
D.
public float addValue (int a,int b,float b=1.0) {//do someting...}