This is the trick that depends on interface.
Compiler says you can cast any class to any interface, it's not my work to deal with interface if programmer using explicit casting, JVM will see this matter.
Why?
As any class' subclasses can implement any interface or any number of interface except final class, as final class cannot be subclassed.
So compiler says I can deal with final class as final class can not produce childs, so I am sure final class reference variable will keep only final class Objects.
For non-final class compiler says I can not deal with them as non-final class reference variable could contain any object if object is of its subclasses.
And for null you can remember one thing, null is assignable to all of the class reference as it always come in last in the hierarchy tree of
java. And Object comes always top in the hierarchy.
Any doubt than ask which line is confusing you ?