1) The Subclass object reference is transformed into a reference to the parent class, called upward transformation. According to the current understanding, an important role of upward transformation is to facilitate the implementation of polymorphism, in the process of upward transformation, relative to the parent class, the subclass of redundant methods are lost, that is, access is not. However, it can be accessed by a downward transformation.
2) The parent class object reference is converted to a subclass reference, called downward transformation. Before using a downward transformation, it is better to use a instanceof B to determine if a is really an example of B (subclass), and then change it down again, or you will run out of the transition failure exception.
Reference: http://www.cnblogs.com/wuyuegb2312/p/java-cast.html
Java up and down transformation