nerdexam
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

1Z0-803 question #152 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)
  • A
    4% (1)
  • D
    4% (1)
  • E
    92% (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.

Full 1Z0-803 Practice