摘要: static 类变量 public class Main{ public static int a = 10; public String name = "chenchenchen" public static void main(String[] args){ System.out.println 阅读全文
posted @ 2021-02-13 22:40 2月2日 阅读(60) 评论(0) 推荐(0)
摘要: 封装 程序设计应当:高内聚,低耦合 做法:属性私有,get/set private public class Main{ public static void main(String[] args){ Student s1= new Student(); s1.setName("chen"); Sy 阅读全文
posted @ 2021-02-13 22:39 2月2日 阅读(60) 评论(0) 推荐(0)