Exam 1z0-811 All QuestionsBrowse all questions from this exam
Question 20

Given the code fragment:

What is the result?

    Correct Answer: A

    The code fragment initializes an array of strings and iterates over it with a for-each loop. During each iteration, if the string is 'CA', the loop continues to the next iteration without increasing the count. For all other strings, the count is incremented by one. The array contains the elements 'CA', 'JP', 'US', 'CA', 'UK'. The 'CA' strings are skipped, leaving 'JP', 'US', and 'UK' to be counted. Thus, the final count is 3.

Discussion
tombatossalsOption: A

Correct answer is A

darius123Option: A

The answer is A

Yousef10Option: A

easy question without any tricks. Answer is A

100766Option: B

Two curly braces are missing

Yousef10

your answer is incorrect, the code runs well , no missing curly braces