xiaobudianbuaishuijiao

导航

2025年3月30日 #

java多态

摘要: 多态:在测试类中转换 如:main类 Student s1 = new Student(); Person s2 = new Student(); Object s3 = new Student(); ((student)s2).eat 强制转化:高转低,从person类型(父类)转化成studen 阅读全文

posted @ 2025-03-30 16:55 小不点不爱睡觉 阅读(5) 评论(0) 推荐(0)

2025年3月29日 #

Java的继承

摘要: public (公共,谁都可以访问) protected(保护,只有不同包不能访问) default(默认,子类、不同包无法访问) private(私有的,只有同一个类的才能访问,子类、同一包、不同包都不能访问) 重写都是方法的重写,和属性无关 Override:代表重写,有功能 静态方法:stat 阅读全文

posted @ 2025-03-29 22:50 小不点不爱睡觉 阅读(24) 评论(0) 推荐(0)

2025年3月5日 #

小不点的第一个博客

摘要: ​# 你好 一级标题 二级标题 hello word hello word hello world hello world ![截图](D:\小不点\Pictures\Saved Pictures\屏幕截图 2024-11-20 111238.png) nohbvk a b c 5 5 5 姓名 性 阅读全文

posted @ 2025-03-05 22:55 小不点不爱睡觉 阅读(10) 评论(0) 推荐(0)