摘要: package net.elaina.interface01; public abstract class Animal { private String name; private int age; public Animal() { } public Animal(String name, in 阅读全文
posted @ 2023-11-20 22:16 _Elaina 阅读(7) 评论(0) 推荐(0)
摘要: 继承的特点 Java只支持单继承,不支持多继承,但支持多层继承。 单继承:一个子类只能继承一个父类 不支持多继承:子类不能同时继承多个父类 多层继承:子类A继承父类B,父类B可以继承父类C 每一个类都直接或者间接的继承于Object 阅读全文
posted @ 2023-11-20 20:24 _Elaina 阅读(16) 评论(0) 推荐(0)
摘要: ![](https://img2023.cnblogs.com/blog/3234449/202311/3234449-20231119214941863-2138672863.png) ![](https://img2023.cnblogs.com/blog/3234449/202311/3234449-20231119215008701-1043372967.png) ![](https:// 阅读全文
posted @ 2023-11-20 20:24 _Elaina 阅读(17) 评论(0) 推荐(0)