Question: 6. Look at the following segment of code, what will be printed? (1 pt Decima 1 Format formati new Decima 1 Format ($0.###); DecimalFormat format2-new
6. Look at the following segment of code, what will be printed? (1 pt Decima 1 Format formati new Decima 1 Format ("$0.###"); DecimalFormat format2-new DecimalFormat ("0.008"); DecimalFormat format3 new DecimalFormat ("0.00"); 9 2 double num1 = 123.56; double num2 0.56789; double num3 234.56789; System.out.println(format1.format (numl)); System.out.println (format2.format (num2)); System.out.println(format3.format (num3)); 2
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
