摘要: 课程代码: 1 // 类型转换 2 // 高 低 3 Person obj = new Student(); 4 // 转成Student类型,就可以使用Student类的方法了 5 ((Student) obj).go(); 6 7 // 低 高 8 Student student = new S 阅读全文
posted @ 2021-02-28 21:28 现在开始JAVA 阅读(152) 评论(0) 推荐(0)
摘要: 课程代码: 1 Object object = new Student(); 2 3 System.out.println(object instanceof Student); // true 4 System.out.println(object instanceof Person); // t 阅读全文
posted @ 2021-02-28 21:12 现在开始JAVA 阅读(142) 评论(0) 推荐(0)