Which two statements, inserted independently at line…

Given: Which two statements, inserted independently at line ***, enable the program to
produce the following output: We have 002 Blue pants that cost $24.99.

Given: 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.format(“We have %s%spants that cost $%s.\n”,quantity, color, price);

B.
String out = System.out.format(“We have %03d %s pants that cost $%3.2f.”,quantity,

color, price); System.out.println(out);

C.
String out = String.format (“We have %03d %s pants that cost $%3.2f.\n”,quantity,
color,price); System.out.println(out);

D.
System.out.printf(“We have %03d %s pants that cost $%3.2f.\n”,quantity, color, price);

E.
System.out.printf(“We have$03d$s pants that cost $$3.2f.\n”,quantity, color, price);



Leave a Reply 0

Your email address will not be published. Required fields are marked *