static 读作静态
package demo;public class Function {static String name;public int age;public void show(String p1) {System.out.println(p1);}// 和实例有关的方法,用this调用具体实例的属性(我们可以称这样的方法叫做实例方法--非静态方法)public void showName() {System.out.println(this.age,name);}/*** 该方法和实例没有关系,可以定义为静态方法(我们称这样的方法为类方法--静态方法)* 静态方法,就可以直接用类名来调用,不需要实例化*/public static void sayHello() {System.out.println("welcome to China");}}