I want to round this double:
3.499999999999999
to:
3.50
And I already used these two methods:
<
You can use the printf formatting which may be simpler.
System.out.printf("%.2f%n", 3.5);
prints