Question 98 of 513
1Z0-829 Controlling Program Flow Practice Question
Exhibit
Refer to the exhibit.
```
int[] numbers = {1, 2, 3, 4, 5};
int sum = 0;
for (int i = 0; i < numbers.length; i++) {
if (numbers[i] % 2 == 0) {
continue;
}
sum += numbers[i];
}
System.out.println(sum);
```What is the output?
```java
int x = 10;
do { System.out.print(x);
} while (x-- > 10);
```
⚠ Common exam trap
The trap here is that candidates often forget that the post-decrement operator uses the original value in the condition before decrementing, leading them to think the first printed value is 10 instead of 9.
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
✓
10
10 because in the missing code, the loop condition likely uses pre-decrement or the print statement occurs before the decrement, so the first value printed is the initial value of x, which is 10. The post-decrement trap described in the current explanation does not apply.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
9
Why it's wrong here
This is incorrect because if the print occurs before decrement, the first output is 10, not 9.
- ✗
15
Why it's wrong here
This value is not produced by any typical loop with x starting at 10.
- ✓
10
Why this is correct
This is correct because the missing code outputs 10 as the first and only value.
- ✗
6
Why it's wrong here
This value does not match the expected output from the described code.
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 11, 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.