Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Simple Java question

Name: Anonymous 2007-09-13 19:00 ID:apP5YkPr

I just started looking into Java programing and I have read some online things about it.
I decided to fiddle around with some programs just multiplying basic numbers. I have set up a float variable for 0.182, when I try to compile I get a "Possible loss or precision" error. What does this mean?
Also my code
class Mutiply {
    public static void main(String[] arguments) {
        float number1 = 5;
        float number2 = 0.182;
        float result = number1 * number2;
        System.out.println(number1 + " Times " + number2);
        System.out.println("\nResult");
     }
}

Name: Anonymous 2007-09-13 19:19 ID:Heaven

Thanks for not answering my question and rather giving me something that I can learn from. Really its a good thing, better to learn by myself. Thanks again.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List