题目内容
请说出E类中【代码1】,【代码2】的输出结果_________,__________。interface Com {int add(int a,int b);}abstract class A {abstract int add(int a,int b);}class B extends A implements Com{public int add(int a,int b) {return a+b;}}public class E {public static void main(String args[]) {B b = new B();Com com = b;System.out.println(com.add(12,6)); //【代码1】A a = b;System.out.println(a.add(10,5)); //【代码2】}}
查看答案
搜索结果不匹配?点我反馈