Solved

What Will Be Printed When the Following Code Is Executed

Question 14

Multiple Choice

What will be printed when the following code is executed? double x = 45678.259;
DecimalFormat formatter =
New DecimalFormat("#,##0.0") ;
System.out.println(formatter.format(x) ) ;


A) 45678.259
B) 45,678.259
C) 45,678.26
D) 45,678.3

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions