Given:
What is the result?
A. A ClassCastException is thrown at runtime.
B. AnotherClass#methodA()
AnotherClass#methodA()
C. The compilation fails.
D. SomeClass#methodA()
AnotherClass#methodA()
E. AnotherClass#methodA() SomeClass#methodA()
F. SomeClass#methodA()
SomeClass#methodA()
Correct id C
ac = (AnotherClass) sc; // Need to Cast in order to work
C)
Error:
| incompatible types:
option C is correct