摘要: public class Application { public static void main(String[] args) { //Object >String //Object >Person>Student //Object >Person>Teacher //System.out.pr 阅读全文
posted @ 2024-01-18 17:48 fightownself 阅读(2) 评论(0) 推荐(0) 编辑
摘要: public class Application { public static void main(String[] args) { //一个对象的实际类型是确定的 //可以指向的引用类型就不确定了:父类的引用指向了子类 //Student 能调用的方法都是自己的或者继承父类的 Student s 阅读全文
posted @ 2024-01-18 10:58 fightownself 阅读(3) 评论(0) 推荐(0) 编辑