Given the code fragment:
What is the result?
Given the code fragment:
What is the result?
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.
Correct answer is A
The answer is A
easy question without any tricks. Answer is A
Two curly braces are missing
your answer is incorrect, the code runs well , no missing curly braces