Oracle
1Z0-804 · Question #15
Given: What is the result?
The correct answer is D. Compilation fails. The compilation fails at line start(); Erstellen eines statischen Verweises auf die nicht statische Methode start() vom Type Uncompilable source code - non-static method start()cannot be referenced from a static context
Java Class Design
Question
Given:
What is the result?
Exhibit
Options
- ADaniel
- BUnknown
- CIt may print"unknown"or"Daniel"depending on the JVM implementation.
- DCompilation fails.
- EAn exception is thrown at runtime.
How the community answered
(21 responses)- A14% (3)
- B5% (1)
- C5% (1)
- D76% (16)
Explanation
The compilation fails at line start(); Erstellen eines statischen Verweises auf die nicht statische Methode start() vom Type Uncompilable source code - non-static method start()cannot be referenced from a static context
Topics
#compilation error#class design#inheritance#method overriding
Community Discussion
No community discussion yet for this question.
