Multiple Choice
Assuming price contains the value 20.0, which of the following statements displays price = 20.00
A) System.out.print("price = ") ;
System.out.printf(price) ;
B) System.out.print("price = ") ;
System.out.printf("%f", price) ;
C) System.out.print("price = ") ;
System.out.printf("%10.2f", price) ;
D) System.out.print("price = ") ;
System.out.printf("%2.10f", price) ;
Correct Answer:

Verified
Correct Answer:
Verified
Q14: What is the result of the following
Q22: What is the value of the following
Q50: Which one of the following statements gives
Q63: Which statements about numeric types in Java
Q78: Which option represents the best choice for
Q106: What is the output of this code
Q107: Which one of the following variables is
Q108: What output is produced by these statements?
Q110: Which is the Java equivalent of the
Q113: What does the following statement sequence print?