nerdexam
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

1Z0-804 question #15 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)
  • A
    14% (3)
  • B
    5% (1)
  • C
    5% (1)
  • D
    76% (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.

Full 1Z0-804 Practice