I came accross a code snippet:
BigDecimal bigDecimal = new BigDecimal(454756.43);
float number = bigDecimal.floatValue();
System.out.println(number);
The result is: 454756.44
So basically I am trying to understand how to get the correct result?
I came accross a code snippet:
BigDecimal bigDecimal = new BigDecimal(454756.43);
float number = bigDecimal.floatValue();
System.out.println(number);
The result is: 454756.44
So basically I am trying to understand how to get the correct result?