Floating point literals in Java are always of type double unless you take care to tell the compiler they're of type float.
Double is a 64 bit floating point number, float is a 32 bit number.
Either change the type to double or change the initial value to 0.0f
And while you're at it follow the Java class naming conventions and
1) name your class in CamelCase, starting the name with a CAPITAL letter
2) use packages. While not a problem yet there are many uses where things don't work well unless you use a package.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337