Oracle
1Z0-851 · Question #271
Click the Exhibit button. Given: ClassA a = new ClassA(); a.methodA(); What is the result?
The correct answer is D. An exception is thrown at runtime. See the full explanation below for the reasoning.
Question
Click the Exhibit button. Given: ClassA a = new ClassA(); a.methodA(); What is the result?
Exhibit
Options
- ACompilation fails.
- BClassC is displayed.
- CThe code runs with no output.
- DAn exception is thrown at runtime.
How the community answered
(33 responses)- A6% (2)
- B3% (1)
- C18% (6)
- D73% (24)
Community Discussion
No community discussion yet for this question.
