0
A PROBLEM WITH A FLOAT NUMBER
float a = 1.1f; System.out.println( a > 1.1 ); Why does it prints a true? i think it supposed to print a false
1 Réponse
+ 7
If you write a number like 1.1, it should automatically be a double instead of a float.
Floats and doubles both have a little inaccuracy, but to a different degree, so the result can slightly differ.