DEVFYI - Developer Resource - FYI

When can an object reference be cast to an interface reference?

Java Interview Questions and Answers (part 1)


(Continued from previous question...)

79. When can an object reference be cast to an interface reference?

An object reference can be cast to an interface reference when the object implements the referenced interface.

(Continued on next question...)

Other Interview Questions