cannot find symbol compiling error

Hello,

I'm getting such a message when I attempt to invoke a method of the built-in Math class. Everything works fine if I type out java.lang.Math.random() (for example), but if I use the shortened form Math.random(), the compiler spits out something like:

test.java:line#: cannot find symbol

symbol : method random()

location :class Math

double d = Math.random();

The arrow is pointing at the period between Math and random. I have no idea why this is happening, and I know I should be able to use the shortened names of the built-in classes, so typing out java.lang.* each time isn't really an option. Could someone provide some insight? Thanks

[758 byte] By [Dmitriva] at [2007-11-27 8:28:37]
# 1
Did you perhaps give the name Math to some class of your own?
prometheuzza at 2007-7-12 20:18:39 > top of Java-index,Java Essentials,New To Java...
# 2

Oi. I feel like a dolt, but yes, there was a mysterious Math class in my projects folder. I'm new to this, but I thought I had that down :). I don't even know how I made it, for it has left my memory since. Haha, good thing I didn't respond all self-assuredly as I was planning to ("No, of course not, I wouldn't do THAT"). Thanks again.

Dmitriva at 2007-7-12 20:18:39 > top of Java-index,Java Essentials,New To Java...
# 3

> Oi. I feel like a dolt, but yes, there was a

> mysterious Math class in my projects folder. I'm new

> to this, but I thought I had that down :). I don't

> even know how I made it, for it has left my memory

> since. Haha, good thing I didn't respond all

> self-assuredly as I was planning to ("No, of course

> not, I wouldn't do THAT").

; )

> Thanks again.

No problem.

prometheuzza at 2007-7-12 20:18:39 > top of Java-index,Java Essentials,New To Java...