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

Java认证考试

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

public abstract class Shape {  private int x;  private int y;  public abstract void draw();  public void setAnchor(int x, int y) {  this.x = x;  this.y = y;  }  }  Which two classes use the Shape class correctly?()

  • A、 public class Circle implements Shape { private int radius; }
  • B、 public abstract class Circle extends Shape { private int radius; }
  • C、 public class Circle extends Shape { private int radius; public void draw(); }
  • D、 public abstract class Circle implements Shape { private int radius; public void draw(); }
  • E、 public class Circle extends Shape { private int radius;public void draw() {/* code here */} }
  • F、 public abstract class Circle implements Shape { private int radius;public void draw() { / code here */ } }
正确答案:B,E
答案解析:
进入题库查看解析

微信扫一扫手机做题