Java中的强制类型转换

1.只能在继承链上进行强制类型转换。

2.将父类转换为子类之前,应该使用运算符instanceof进行检查。

posted @ 2020-01-14 11:47  zihengQuan  阅读(240)  评论(0)    收藏  举报