I want to round this double:
3.499999999999999
to:
3.50
And I already used these two methods:
<
Did you try replacing the 0's with #'s?
0
#
DecimalFormat df = new DecimalFormat("#.##"); System.out.println(df.format(input));
According to here the # will be resolved to 0 if the digit is absent