摘要: 面向对象编程(2) static关键字 加在变量前,将变量变成静态变量 加在方法前,将方法变成静态方法 静态方法,静态变量是可以直接调用的 public class test { public static int age; //静态变量 public String name="lerry"; // 阅读全文
posted @ 2022-07-02 18:20 lerry1342 阅读(47) 评论(0) 推荐(0)