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

Java认证考试

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

public class OuterClass {   private double d1 1.0;   //insert code here   }   You need to insert an inner class declaration at line2. Which two inner class declarations are valid?()

  • A、 static class InnerOne {  public double methoda() {return d1;}  }
  • B、 static class InnerOne {  static double methoda() {return d1;}  }
  • C、 private class InnerOne {  public double methoda() {return d1;}  }
  • D、 protected class InnerOne {  static double methoda() {return d1;}  }
  • E、 public abstract class InnerOne {  public abstract double methoda();  }
正确答案:C,E
答案解析:
进入题库查看解析

微信扫一扫手机做题