Henry Wong wrote:
Line 15 is pretty simple. Think about it. It is possible for any array class to implement the runnable interface? And if so... how?
Got it, thanks.
Henry Wong wrote:
Line 17 is a bit more complicated. Hint. Class C is a final class.
Still I am not sure on why/how the compiler is sure that assignment is wrong.
I'll try to explain what I think, please confirm me:
maybe, since class C is final, the compiler knows that the run-time object assigned to the 'c' reference variable can't be a subclass of C implementing runnable ?
But, if we anlyze this assignment:
Then the compiler can't know for sure that, at run-time, ra1 could be an array object of a class X such that
Am I right ?