Help me please Math squirt stopped working
Hi,
I hope some one can help.
I got a java 2 beginners book that I've been learning out of. The thing is I got away from it for a while so when I came back I kinda started going back through the book
at the begining. Here's the exact code with the problem,
I wrote this some time ago directly out of the book, and it worked fine, but now when I tried to write it again it won't compile:
class Hypot {
public static void main(String args[]) {
double x, y, z;
x = 3;
y = 4;
z = Math.sqrt(x*x + y*y);
System.out.println("The Hypotenuse is " +z);
}
}
Heres the error I get when I try to compile, mind you this worked a couple of months ago with no probs.
Im thinking maybe somthing is conflicting with it?
****
Math.java:8: cannot resolve symbol
symbol : method sqrt (double)
location: class Math
c = Math.sqrt(x*x + y*y);
^
1 error
sorry to be so long winded.
Thanks in advance to anyone who can give some advice.
Dave 102979dd@gte.net

