Oracle
1Z0-803 · Question #152
Given: What is the result?
The correct answer is E. Compilation fails.. Exception in thread "main" java.lang.Error: Unresolved compilation problems: The local variable sum may not have been initialized The local variable sum may not have been initialized
Using Loop Constructs
Question
Given:
What is the result?
Exhibit
Options
- AThe sum is 2.
- BThe sum is 14.
- CThe sum is 15.
- DThe loop executes infinite times.
- ECompilation fails.
How the community answered
(26 responses)- A4% (1)
- D4% (1)
- E92% (24)
Explanation
Exception in thread "main" java.lang.Error: Unresolved compilation problems: The local variable sum may not have been initialized The local variable sum may not have been initialized
Topics
#loop syntax#compilation error
Community Discussion
No community discussion yet for this question.
