class Circle
{
public static float PI=3.1415926F;
public float area(int r)
{
return PI*r*r;
}
public static void main(String[] arg)
{
Circle c=new Circle();
float a=c.area(Integer.parseInt(arg[0]));
System.out.println("area is: "+a);
}
}
这样做就对了arg是个数组