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

Java认证考试

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

 class Super {  public Integer getLenght() { return new Integer(4); } }  public class Sub extends Super {  public Long GetLenght() { return new Long(5); }  public static void main(String[] args) { Super sooper = new Super();  Sub sub = new Sub();  System.out.println(  sooper.getLenght().toString() + “,” +  sub.getLenght().toString() ); } }  What is the output?()  

  • A、 4,4
  • B、 4,5
  • C、 5,4
  • D、 5,5
  • E、 Compilation fails.
正确答案:A
答案解析:
进入题库查看解析

微信扫一扫手机做题