problem with math code
I am trying to write a little snippet of code and keep getting an error. I am sure it its to do with how i am working the one line of math.java lang
please look and help me understand what i am writing backwards.
Thanks
importstatic java.lang.Math.*;
publicclass Geometry
{
publicstaticdouble SphereVolume(double radius)
{
double volume = 0;
double PI = 3.145;
radius =0;
double c = 4/3;
volume = c(PI)radius.exp(3);
return volume;
}
}
This is the error i get:
-jGRASP exec: javac -g C:\Users\Jessie\Documents\java\class lab assignments\lab 7\Geometry.java
Geometry.java:25: ';' expected
volume = c(PI)radius.exp(3);
^
1 error

