Oracle
1Z0-808 · Question #22
1Z0-808 Question #22: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-808 to reveal the answer and full explanation for question #22. The question stem and answer options stay visible for context.
Using Loop Constructs
Question
Given the code fragment:
int[] array = {1, 2, 3, 4, 5};
And given the requirements:
- Process all the elements of the array in the order of entry.
- Process all the elements of the array in the reverse order of entry.
- Process alternating elements of the array in the order of entry.
Options
- ARequirements 1, 2, and 3 can be implemented by using the enhanced for loop.
- BRequirements 1, 2, and 3 can be implemented by using the standard for loop.
- CRequirements 2 and 3 CANNOT be implemented by using the standard for loop.
- DRequirement 1 can be implemented by using the enhanced for loop.
- ERequirement 3 CANNOT be implemented by using either the enhanced for loop or the standard for loop.
Unlock 1Z0-808 to see the answer
You've previewed enough free 1Z0-808 questions. Unlock 1Z0-808 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.
Topics
#enhanced for loop#standard for loop#array iteration#loop control