Oracle
1Z0-851 · Question #179
1Z0-851 Question #179: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-851 to reveal the answer and full explanation for question #179. The question stem and answer options stay visible for context.
Question
Given: public class Breaker { static String o = ""; public static void main(String[] args) { z: o = o + 2; for(int x = 3; x < 8; x++) { if(x==4) break; if(x==6) break z; o = o + x; } System.out.println(o); } } What is the result?
Options
- A23
- B234
- C235
- D2345
- E2357
- F23457
- GCompilation fails.
Unlock 1Z0-851 to see the answer
You've previewed enough free 1Z0-851 questions. Unlock 1Z0-851 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.