会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
chengdashao
导航
博客园
首页
新随笔
联系
订阅
管理
公告
2022年6月13日
封装、继承
摘要: 封装: private String name; 快捷键:Alt+Insert自动生成getName()、setName() 封装的作用: 1.提高程序安全性,保护数据 2.隐藏代码的实现细节 3.统一接口 4.系统可维护增加了 继承: 学生继承人 public class student exte
阅读全文
posted @ 2022-06-13 17:22 梦洁宝宝
阅读(39)
评论(0)
推荐(0)
2022年6月10日
构造器
摘要: import java.security.PublicKey;public class Student { String name; int age; public Student() { } public Student(String name, int age) { this.name = na
阅读全文
posted @ 2022-06-10 12:00 梦洁宝宝
阅读(25)
评论(0)
推荐(0)