BigDecimal scale question
Ok, excuse the stupid question, I am having some difficulty with BigDecimal code.
BigDecimal testBigDecimal =new BigDecimal(22.245);
System.out.println("BigDecimal is: " + testBigDecimal);
Outputs...
22.245000000000000994759830064140260219573974609375
I only want it to 22.245 so I add the following code
testBigDecimal.setScale(3, BigDecimal.ROUND_FLOOR);
testBigDecimal.scale();
System.out.println("workOrder..." + testBigDecimal.abs());
which then outputs 22.245000000000000994759830064140260219573974609375
My question is how do I enforce scale so that the output will be
22.245?
Thanks

