1Z0-805 · Question #77
Given: public class StringApp { public static void main(String[] args) { String[] str="Java SE,java EE,Java ME,java FX".split(","); int count=0; for(int i=0;i<str.length;i++) { switch(str[i]) { case…
Sign in or unlock 1Z0-805 to reveal the answer and full explanation for question #77. The question stem and answer options stay visible for context.
Question
Given:
public class StringApp { public static void main(String[] args) { String[] str="Java SE,java EE,Java ME,java FX".split(","); int count=0; for(int i=0;i<str.length;i++) { switch(str[i]) { case "Java SE":
count++; continue; case "Java EE":
count++; break; case "Java ME":
count++; break; case "Java FX":
Oracle 1Z0-805 Exam count++; break; } } System.out.println("Total match found="+count); } } What is the result?
Options
- A1
- B2
- C3
- D4
Unlock 1Z0-805 to see the answer
You've previewed enough free 1Z0-805 questions. Unlock 1Z0-805 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.