Courseiva
Controlling Program FlowhardMultiple ChoiceObjective-mapped

1Z0-829 Controlling Program Flow Practice Question

Given: outer: for(int i=0; i<3; i++) { for(int j=0; j<3; j++) { if(j==1) continue outer; } } How many times does the innermost loop body execute?

⚠ Common exam trap

The trap here is that candidates often forget the inner loop body executes for j=0 before the continue, leading them to think it never runs or runs all 9 times.

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

3

The outer loop runs with i=0,1,2. For each i, the inner loop starts j=0, executes the body once, then j=1 triggers 'continue outer', which skips the rest of the inner loop and increments i. Thus the inner loop body executes exactly once per outer iteration, for a total of 3 times.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • 3

    Why this is correct

    Correct: only j=0 runs for each i, so 3 times.

  • 0

    Why it's wrong here

    Incorrect; the loop body executes at least once.

  • 9

    Why it's wrong here

    Incorrect; the continue outer prevents full inner loop execution.

  • 6

    Why it's wrong here

    Incorrect; the inner loop does not complete all iterations.

About these practice questions

Courseiva writes every 1Z0-829 question from scratch — 513 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.