Question 18 of 76 from exam 1Z0-808: Java SE 8 Programmer I

Question 18 of 76 from exam 1Z0-808: Java SE 8 Programmer I

Question

Given the code fragment:

String shirts[][] = new string[2] [2];

shirts[0][0] = "red";
shirts[0][1] = "blue";

shirts[1][0] = "small";
shirts[1][1] = "medium";

Which code fragment prints red: blue: small: medium?

(int index = 1) index < 2; indext+) {
for (int idx = 1) idx < 2; idxt+) {
system. out. print (shirts [index] [idx]

(int index = 0; index < 2; ++index) {
for (int idx = 0; idx < index; ++idx) {
System. out. print (shirts [index] [idx]

(string ¢ : colors) {
for (String s : sizes) {
System.out.println(s + ":");

(int index = 0; index < 2;) {

for (int idx = 0; idx < 23) {
System. out. print (shirts [index] [idx]
idutt:

}

indext+;

+

+

+

mye

a)

oan

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

D.