import java.io.*;
public class circle{
int radius;
public circle(){
radius=1;
}
public int getradius(){
return radius;
}
public void setradius(int newradius){
radius=newradius;
}
public double circlearea(){
return math.pi*radius*radius;
}
public double circlelength(){
return 2.0*math.pi*radius;
}
}
文件名为circle.java,提示如下:
circle.java:14:cannot find symbol
symbol:variable math
location:class circle
return math.pi*radius*radius;
------解决方案--------------------
math --> Math
------解决方案--------------------
pi-> PI