多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

Given the following code, which method declarations, when inserted at the indicated position, will not cause the program to fail compilation?()   public class Qdd1f {   public long sum(long a, long b) {  return a + b;  }   // insert new method declaration here  }  

  • A、public int sum(int a, int b) { return a + b; }
  • B、public int sum(long a, long b) { return 0; }
  • C、abstract int sum();
  • D、private long sum(long a, long b) { return a + b; }
  • E、public long sum(long a, int b) { return a + b; }
正确答案:A,E
答案解析:
进入题库查看解析

微信扫一扫手机做题