题目内容
1、A为接口,B实现了A接口,请根据要求填写以下空缺的代码,并写出运行的结果。{double f(double x,double y);}class B {{return x*y;}int g(int a,int b){return a+b;}}public class E{public static void main(String[] args){A a=new B();B b=(B)a;System.out.println(b.g(3,5));}}运行结果是:
查看答案
搜索结果不匹配?点我反馈