我分别定义类aaa跟类ccc,把二个类都放在同一目录下:
public class aaa {
public static void main(String args[])
{
ccc ball=new ccc(4.0,0.0,0.0,0.0);
System.out.println(ball.volume());
}
}
public class ccc {
static finaldo
uble PI=3.14;
double radius,xcenter,ycenter,zcenter;
ccc(double theradius,double x,double y,double z)
{
radius=theradius;
xcenter=x;
ycenter=y;
zcenter=z;
}
double volume()
{
return 4.0/3*PI*radius*radius;
}
public static void main(String args[])
{
System.out.println("java");
}
}
当我编译javac aaa.java时会显示错误“aaa.java:6: Class ccc not found.
ccc ball=new ccc(4.0,0.0,0.0,0.0);"请问这是什么原因呢? ;为什么会找不到类ccc呢