摘要: ClassCastException 表示类型转换异常 例如:Pet 宠物类 Dog 狗狗类 (继承Pet) Penguin 企鹅类(继承Pet) Dog dog = (Dog)pet ; 正确 向下转型 Dog dog = (Dog)penguin ; 错误 向下转型 处理方法:使用 instan 阅读全文
posted @ 2019-07-16 10:48 AxeBurner 阅读(1158) 评论(0) 推荐(0)