123456789101112131415



Question 1: Given:

NumberFormat nf = NumberFormat.getInstance();
13. nf.setMaximumFractionDigits(4);
14. nf.setMinimumFractionDigits(2);
15. String a = nf.format(3.1415926);
16. String b = nf.format(2);
Which one statement is true about the result if the default locale is Locale.US?

1. The value of b is 2.
2. The value of a is 3.14.
3. The value of b is 2.00.
4. The value of a is 3.141.