Which two statements, inserted independently at line ***, enable the program to produce the
following output:
We have 002 Blue pants that cost $24.99.
A.
System.out.printf(“We have %03d %s pants that cost $%3.2f.\n”,quantity, color, price);
B.
System.out.printf(“We have$03d$s pants that cost $$3.2f.\n”,quantity, color, price);
C.
String out = String.format (“We have %03d %s pants that cost $%3.2f.\n”,quantity, color,price);
System.out.println(out);
D.
String out = System.out.format(“We have %03d %s pants that cost $%3.2f.”,quantity, color,
price);
System.out.println(out);
E.
System.out.format(“We have %s%spants that cost $%s.\n”,quantity, color, price);
Explanation:
Correct