Given: What is the result?
A.
Compilation fails.
B.
It may print”unknown”or”Daniel”depending on the JVM implementation.
C.
Daniel
D.
An exception is thrown at runtime.
E.
Unknown
Explanation:
Given: What is the result?
A.
Compilation fails.
B.
It may print”unknown”or”Daniel”depending on the JVM implementation.
C.
Daniel
D.
An exception is thrown at runtime.
E.
Unknown
Explanation:
answer: A
name is static, that can’t be override.
should new Runner().start()
Yes, A. Accessing non-static method from a static context!