Question 315 of 513
1Z0-829 Controlling Program Flow Practice Question
Given the following code:
```java outer:
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
if (i == 1) {continue outer;
}
System.out.print(i + " " + j + " ");
} }
```
What is the output?
⚠ Common exam trap
The trap here is that candidates often forget that continue outer skips the entire inner loop for the current outer iteration, not just the current inner iteration, leading them to include i=1 outputs or misformat the output.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
0-0 0-1 0-2 2-0 2-1 2-2
The code uses a labeled continue statement 'continue outer' that, when i equals 1, skips the entire inner loop for that iteration. Thus, no output is produced when i=1. The output consists of the pairs from i=0 (j=0,1,2) and i=2 (j=0,1,2), resulting in '0 0 0 1 0 2 2 0 2 1 2 2', which is correctly represented in option D.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
0-0 0-1 0-2 1-0 2-0 2-1 2-2
Why it's wrong here
Incorrect: This option includes the pair (1,0) which is skipped by the 'continue outer' statement when i=1.
- ✗
0-0 0-1 0-2 1-0 1-1 1-2 2-0 2-1 2-2
Why it's wrong here
Incorrect: This option includes all pairs for i=1, but the 'continue outer' prevents any output from the i=1 iteration.
- ✗
0-0 0-1 0-2 2-0 2-1
Why it's wrong here
Incorrect: Although this option text is identical to D, the intended correct answer is D. The duplication is a flaw in the question design.
- ✓
0-0 0-1 0-2 2-0 2-1 2-2
Why this is correct
Correct: This output matches the program's execution exactly: the pairs from i=0 and i=2, with i=1 omitted entirely.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 25, 2026
This 1Z0-829 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-829 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.