摘要: # 继承 Java只有单继承,最顶级的父类是Object。 子类会继承父类的fields和methods,而不会继承constructors,因为constructors不属于methods,但是子类可以通过super调用父类的constructor。 子类继承父类的范围是:public、prote 阅读全文
posted @ 2023-06-02 23:31 测试开发刚哥 阅读(13) 评论(0) 推荐(0) 编辑
摘要: # Numbers Number的子类: ![](https://img2023.cnblogs.com/blog/1629545/202306/1629545-20230602140903535-645231197.png) 另外还有BigDecimal和BigInteger,用于高精度计算,At 阅读全文
posted @ 2023-06-02 14:09 测试开发刚哥 阅读(12) 评论(0) 推荐(0) 编辑
摘要: # 创建类 定义类Bicycle: ```java public class Bicycle { // the Bicycle class has // three fields public int cadence; public int gear; public int speed; // th 阅读全文
posted @ 2023-06-02 11:17 测试开发刚哥 阅读(9) 评论(0) 推荐(0) 编辑