I have a piece of code as below.
String wtf = "8.40";
float ft = Float.parseFloat(wtf); //8.4
ft *= 100.0F;
the value of "ft" above is coming as 839.99994
I expected output as 840.00000 How can I correct my code so that it gives me 840.00000 as output