Deepa:
A]In the first case, the obj of type Object. The true nature of the class that the obj reference points to is ApBase . But at compile time the true nature of the class is not evaluated. Checks are made only between the reference type. Here you are trying to assign a Object type to Runnable.
Java is a strongly typed language. It does not allow assignments of subclasses or interfaces to superclasses. You have to use the casting operator
B] This is OK. At compile time you can always cast between any non final object and interface. But at run time if the new type is a interface, then the class must implement that interface. Both of which are happening here. So it is right.
C]At compile time you can always cast between any interface and any non final object. There is no problem. However the rule at runtime says that if the new type is a interface then the class must implement that interface. And hence is a error
D]Here you are not casting. It is a conversion. The rules for conversion say that if the new type is a interface, the class on the right hand side must implement the interface
Regards
Gunjan