I need to format (and not round off) a double to 2 decimal places.
double
I tried with:
String s1 = \"10.126\"; Double f1 = Double.pa
You can set the rounding mode of the formatter to DOWN:
df.setRoundingMode(RoundingMode.DOWN);