As timvw said, that's right 2f") We also can use String formater %2f to round the double to 2 decimal places DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers It is better to understand with an example. The answer is rounded off to three decimal points DecimalFormat formatter = new DecimalFormat("0000") sNewV BlockedNumbers Browser CalendarContract CalendarContract. It also supports different kinds of numbers, including integers (123), fixed-point. The setMaximumFractionDigits () method is a built-in method of the java.
0 Comments
Leave a Reply. |