class Circle{
private double radius;
public Circle(double r){
radius = r;
}
public double area;
public double getArea(double r) {
area = 3.14*r*r;
return area;
}
}
public class Ex_Circle {
public static void main(String[] args){
Circle c;
c = new Circle(1);
c.getArea();
System.out.println(c.area);
}
}
到底哪里出问题了,求解啊 |