Given the code fragment:
Which code fragment prints red: blue: small: medium?
A. Option A
B. Option B
C. Option C
D. Option D
Given the code fragment:
Which code fragment prints red: blue: small: medium?
A. Option A
B. Option B
C. Option C
D. Option D
D
B
Sorry. D is the correct answer.
The correct answer is A.
Answers B and D don’t work.
Answer C would work if it was changed to:
for(String[] c: shirts){
for(String s: c){
System.out.print(s + “:”);
}
}
The correct answer is D!
A is missing the the 0 index