As David has already pointed out, you should post the compiler error you are receiving. In addition to this, you also need to check out some Java coding conventions as suggested by Jeroen. Here are the recommended coding conventions from Sun's java website:
I don't agree 100% with ALL of the standards in this document, but most of it is applicable. I would start with Section 9 - Naming Conventions.
Now back to the problem with your code snippet - just a small hint that may assist in solving your issue - read up on Java numeric data types and how Java arithmetic works. Also check out the topic of casting.