0

How to round number after decimal useing double

Example 38.567 but I want the print to say 38.57?

24th Sep 2017, 6:23 PM
Joshua Smith
Joshua Smith - avatar
1 ответ
+ 15
System.out.printf("%.2f", 38.567);
24th Sep 2017, 6:26 PM
Dev
Dev - avatar