Home Tutorial Java Scjp Part12 SCJP Module-12 Question-4


Share on Google+Share on Google+
SCJP Module-12 Question-4
Posted on: July 20, 2010 at 12:00 AM
The Sample program given below will check your understanding of number formating in Java.

Given below the sample code :

1. double in= 314159.26;
2. NumberFormat nof = NumberFormat.getInstance(Locale.ITALIAN);
3. String str;
4. //insert code here

Which code should be inserted at line 4 to set the value of b to 314.159,26?

1.str = nof.parse(in);

2.str = nof.format(in);

3.str = nof.equals(in);

4.str = nof.parseObject( in);




Related Tags for SCJP Module-12 Question-4:

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 20, 2010

Recommend the tutorial

Advertisements Advertisements