How do you cut down float primitive in java to two decimal places, without using rounding?:
123.99999 to 123.99
-8.022222 to
First of all, there is no guarantee that just because a float can represent a.bcde exactly, it is guaranteed to be able to represent a.bc exactly.
So if you're after just the printing part, how about doing it with some string-manipulation? Find the decimal point using indexOf and extract the part with two decimals, using substring.