Which code, inserted at line 14, sets the value of b to 314.159,26?

Given:
11. double input = 314159.26;
12. NumberFormat nf = NumberFormat.getInstance(Locale.ITALIAN);

13. String b;
14. //insert code here
Which code, inserted at line 14, sets the value of b to 314.159,26?

Given:
11. double input = 314159.26;
12. NumberFormat nf = NumberFormat.getInstance(Locale.ITALIAN);

13. String b;
14. //insert code here
Which code, inserted at line 14, sets the value of b to 314.159,26?

A.
b = nf.parse( input );

B.
b = nf.equals( input );

C.
b = nf.parseObject( input );

D.
b = nf.format( input );



Leave a Reply 0

Your email address will not be published. Required fields are marked *