易搜题 > 资格证大类 > 计算机编程 > 问题详情
问题详情

public abstract class Shape {  int x;  int y;  public abstract void draw();  public void setAnchor(int x, int y) {  this.x = x;  this.y = y;  }  }  and a class Circle that extends and fully implements the Shape class. Which is correct?() 

A、 Shape s = new Shape(); s.setAnchor(10,10); s.draw();

B、 Circle c = new Shape(); c.setAnchor(10,10); c.draw();

C、 Shape s = new Circle(); s.setAnchor(10,10); s.draw();

D、 Shape s = new Circle(); s->setAnchor(10,10); s->draw();

E、 Circle c = new Circle(); c.Shape.setAnchor(10,10); c.Shape.draw();

未找到的试题在搜索页框底部可快速提交,在会员中心"提交的题"查看可解决状态。 收藏该题
查看答案

相关问题推荐

  • You want to limit access to a method of a public class to members of the same class. Which access modifier accomplishes this objective?()  

    A、 Public

    B、 Private

    C、 Protected

    D、 Transient

    E、 No access modifier is required

  • 计算机感染特洛伊木马后的典型现象是(45)。

    A.程序异常退出

    B.有未知程序试图建立网络连接

    C.邮箱被垃圾邮件填满

    D.Windows系统黑屏

  • Which two methods, inserted independently at line 17, correctly complete the Sales class?()

    A

    double getSalesAmount() { return 1230.45; }

    B

    public double getSalesAmount() { return 1230.45; }

    C

    private double getSalesAmount() { return 1230.45; }

    D

    protected double getSalesAmount() { return 1230.45; }

  • Which two CANNOT directly cause a thread to stop executing?()

    A

     Calling the yield method.

    B

     Calling the wait method on an object.

    C

     Calling the notify method on an object.

    D

     Calling the notifyAll method on an object.

    E

     Calling the start method on another Thread object.

  • What is the result?()

    A、 X, followed by an Exception.

    B、 No output, and an Exception is thrown.

    C、 Compilation fails due to an error on line 14.

    D、 Compilation fails due to an error on line 16.

    E、 Compilation fails due to an error on line 17.

    F、 X, followed by an Exception, followed by B

联系客服 会员中心
TOP