中国石油大学 / 中石油
正确率:100%
11. 对于下列代码: public class Parent { public int addValue( int a, int b) { int s; s = a b; return s; } } class Child extends Parent { } 下述哪些方法可以加入类Child ( )
A、int addValue( int a, int b ){// do something...}
B、public void addValue (int a, int b ){// do something...}
C、public int addValue( int a ){// do something...}
D、public int addValue( int a, int b )throws MyException {//do something...}
A、int addValue( int a, int b ){// do something...}
B、public void addValue (int a, int b ){// do something...}
C、public int addValue( int a ){// do something...}
D、public int addValue( int a, int b )throws MyException {//do something...}
参考答案:
佳题速递: