Home » Interview » Technology

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?

Correct Answer: public abstract class Circle extends Shape { private int radius; }

Explanation:

Only B is true


← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion