对于下列代码:public class Parent{public int addValue(int a,int b){int s;s=a+b;return s;}}class Child extends Parent{ }下列哪个方法不可以加入类Child?
A. public int addValue(int a,int b,int c) {return a+b+c;}
B. int addValue(int a,int b) {return a+b;}
C. public int addValue(int a) {return a+1;}
D. public int addValue(int a,int b) {return a+b+1;}
下列程序段输出结果是()public class A implements B{public static void main(String args[]) {int i;A c1=new A();i=c1.k;System.out.println("i="+i);}}interface B{int k=10;}
A. i=0;
B. i=10;
C. 程序有编译错误
D. i=true
阅读下面的程序,输出结果是()public class TestDemo{int m=5;public void some(int x){m=x;}public static void main(String args[]) {new Demo().some(7);}}class Demo extends TestDemo{int m=8;public void some(int x) {super.some(x);System.out.println(m);}}
A. 5
B. 8
C. 7
D. 编译错误