0

I have a double and a integer value and I wan't to multiply them. My code look completely normal but I get wrong output. Is there something I don't know or is this a bug?

    double db = 1.2;
    int m = 3;
    System.out.print(String.valueOf(db*m));

My output is : 3.5999999999999996.

I need to get 3.6 as output.

3

0