题目内容
写出下列B类中【代码1】,【代码2】的输出结果。class A {public int getNumber(int a) {return a+1;}}class B extends A {public int getNumber (int a) {return a+100;}public static void main (String args[]) {A a =new A();System.out.println(a.getNumber(10)); //【代码1】a = new B();System.out.println(a.getNumber(10)); //【代码2】}}
查看答案
搜索结果不匹配?点我反馈