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

Given the code fragment:

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

A. Option A
B. Option B
C. Option C
D. Option D

Download Printable PDF. VALID exam to help you PASS.

5 thoughts on “Which code fragment prints red: blue: small: medium?

  1. 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 + “:”);
    }
    }

Leave a Reply

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


The reCAPTCHA verification period has expired. Please reload the page.