Solved

Consider the Following Code Snippet: System.out.printf("%-12s%8.2f",description,totalPrice);

Question 27

Multiple Choice

Consider the following code snippet: System.out.printf("%-12s%8.2f",description,totalPrice) ;
Which of the following statements is correct?


A) This code will produce 2 columns, with the description field left justified and the totalPrice field right justified.
B) This code will produce 2 columns, with the description field right justified and the totalPrice field right justified.
C) This code will produce 2 columns, with the description field right justified and the totalPrice field left justified.
D) This code will produce 2 columns, with the description field left justified and the totalPrice field left justified.

Correct Answer:

verifed

Verified

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

Related Questions