Home » Oracle » 1z0-803 » What is the result?
Given:
What is the result?
A. 0
B. 012
C. 012012012
D. Compilation fails
Correct Answer: B
Explanation/Reference:
Explanation:
table.length is 3. So the do-while loop will run 3 times with ii=0, ii=1 and ii=2.
The second while statement will break the do-loop when ii = 3.
Note: The Java programming language provides a do-while statement, which can be expressed as follows:
do {
statement(s)
} while (expression);
Download Printable PDF. VALID exam to help you PASS.
|
|