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

[1288 byte] By [jrb47a] at [2007-11-27 1:36:50]
# 1
volume = c*(PI)*Math.pow(radius, 3);
PhHeina at 2007-7-12 0:46:45 > top of Java-index,Java Essentials,New To Java...
# 2
I think it should be:import java.math.*;volume = c*(PI)*Math.pow(radius,3);
mmidea at 2007-7-12 0:46:45 > top of Java-index,Java Essentials,New To Java...
# 3

public static double SphereVolume(double radius) {

double volume = 0;

double PI = 3.145;

radius = 0;

double c = 4 / 3;

volume = c * (PI) * radius * Math.pow(radius, 3);

return volume;

}

}

Satish_Patila at 2007-7-12 0:46:45 > top of Java-index,Java Essentials,New To Java...
# 4
Let's avoid integer division. double c = 4.0 / 3;
BIJ001a at 2007-7-12 0:46:45 > top of Java-index,Java Essentials,New To Java...
# 5
java.lang.Math.PI is there.
BIJ001a at 2007-7-12 0:46:45 > top of Java-index,Java Essentials,New To Java...
# 6
> java.lang.Math.PI is there.The OP imported PI statically. So, s/he should be OK by just writing PI.
prometheuzza at 2007-7-12 0:46:45 > top of Java-index,Java Essentials,New To Java...
# 7
// I wanted to hint that this line is contraproductive: double PI = 3.145;
BIJ001a at 2007-7-12 0:46:45 > top of Java-index,Java Essentials,New To Java...
# 8
> // I wanted to hint that this line is> contraproductive: > double PI = 3.145;Ah, I see.
prometheuzza at 2007-7-12 0:46:45 > top of Java-index,Java Essentials,New To Java...