You can refer Java Language Specification
Second Edition
5.5
If S is a class type:
If T is a class type, then S and T must be related classes-that is, S and T must be the same class, or S a subclass of T, or T a subclass of S; otherwise a compile-time error occurs.
If T is an interface type:
If S is not a final class (��8.1.1), then the cast is always correct at compile time (because even if S does not implement T, a subclass of S might).
If S is a final class (��8.1.1), then S must implement T, or a compile-time error occurs.