Oracle
1Z0-804 · Question #127
Given: What is the result?
The correct answer is E. Compilation fails. error: incompatible types e = new Exception(); required: RuntimeException found: Exception
Exceptions and Assertions
Question
Given:
What is the result?
Exhibit
Options
- ANull
- Bclass java.lang.ArraylndexOutOfBoundsException
- Cclass java.lang.NullPointerException
- Dclass java.lang.Exception
- ECompilation fails.
How the community answered
(38 responses)- A3% (1)
- B3% (1)
- C13% (5)
- D8% (3)
- E74% (28)
Explanation
error: incompatible types e = new Exception(); required: RuntimeException found: Exception
Topics
#exception handling#null pointer#compilation#exception types
Community Discussion
No community discussion yet for this question.
