2021年10月9日

Java 中static修饰方法,有什么好处和坏处

摘要: 用static修饰的方法可以直接调用,不用static修饰的需要先实例化对象才可以调用。 public class A { public static void main(String[] args) { A a = new A(); String b = a.b(); String c = c() 阅读全文

posted @ 2021-10-09 15:14 天天天12345 阅读(301) 评论(0) 推荐(0) 编辑

导航