摘要: 多态 package oop.demon01.demon06; ​ public class Application { public static void main(String[] args) { // 一个对象的实际类型是确定的 // new Student(); //new Person( 阅读全文
posted @ 2021-08-01 16:32 时间最考验人 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 方法重写 static : ​ ​ package oop.demon01.demon05; ​ public class Application { public static void main(String[] args) { ​ //方法的调用只和左边,定义的数据类型有关 A a=new A 阅读全文
posted @ 2021-08-01 11:13 时间最考验人 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Super main ​ package oop.demon01.demon05; ​ public class Application { public static void main(String[] args) { ​ Student student=new Student();(3) // 阅读全文
posted @ 2021-08-01 10:23 时间最考验人 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 继承 package oop.demon01.demon05; ​ // Person 人 父类 public class Person { //public //protected //default //private 子类无法直接继承私有类(private) public int money 阅读全文
posted @ 2021-08-01 09:34 时间最考验人 阅读(37) 评论(0) 推荐(0) 编辑