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