摘要: 封装与隐藏: 封装主要通过限定词实现: 比如,对于类中的某个变量不允许用户直接使用,而是需要通过调用方法赋值,因为有些限制(比如年龄不能为负数) public class test{ public static void main(String[] args) { man m=new man(); 阅读全文
posted @ 2020-04-07 14:22 记得喝牛奶 阅读(118) 评论(0) 推荐(0)