What is the result?

Given:
public class DoBreak1 {
public static void main(String[] args) {
String[] table = {"aa", "bb", "cc", "dd"};
for (String ss: table) {
if ( "bb".equals(ss)) {
continue;
}
System.out.println(ss);
if ( "cc".equals(ss)) {
break;
}
}
}
}
What is the result?
A. aa cc
B. aa bb cc
C. cc dd
D. cc
E. Compilation fails.

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

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


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