I have a scenario where we need to display two zeros i.e 00 after the precision for double value. But unfortunately Java is not returning the second zero.
I have tried the below way but it is returning only one zero after decimal.
double inputvalue = 12345.00;
double d = ((BigDecimal.valueOf(inputvalue)).setScale(2,RoundingMode.UP)).doubleValue();
Expected output: 12345.00 but it is returning 1234.0.