class Circle{
double r;
double pi=3.14;
public Circle(double r) {
this.r = r;
}
public void Getarea() {
System.out.println("狗蛋同学算出来的圆的面积为:"+r*r*pi);
}
public void Circle(double r) {
}
}
public class Dome {
public static void main(String []args) {
Circle c = new Circle (5.0);
test(c);
}
public static void test(Circle c) {
c = new Circle(4.0);
c.Getarea();
}
}