10. 다음 자바 코드에서 오류가 발생하는 문장은?
abstract class Shape {
public void paint() { draw(); }
abstract public void draw();
}
abstract class Circle extends Shape {
public int radius;
public Circle(int radius) {
this.radius = radius; }
double getArea() {
return (3.14 * radius * radius); }
}
public class NamedCircle extends Circle {
String name;
public NamedCircle(int radius, String name) {
super(radius);
this.name = name;
}
public void draw() {
System.out.println("반지름이 " +
radius + "인 원을 그리다.");
}
public static void main(String[] args) {
Shape s;
s = new Shape();
NamedCircle w = new NamedCircle(5, "Ring");
System.out.println(w.getArea());
w.draw();
}
}
- 1super(radius);

- 2Shape s;

- 3s = new Shape();

- 4System.out.println(w.getArea());
