• 2022-05-28
    给出下列【代码】注释标注的代码的输出结果。abstract class A {abstract int get(int a,int b);}public class E {public static void main(String args[]) {A a=new A() {public int get(int a,int b){return a+b;}};int m = a.get(2,5);a=new A() {public int get(int a,int b){return a*b;}};int n = a.get(2,5);System.out.printf("%d:%d",m,n);//【代码】}}
  • 举一反三