package com.oop;
public class Demo01 {
//静态方法 static
//非静态方法
public static void main(String[] args) {
Student.say(); //类名.方法名 直接调用静态方法
Student student = new Student(); //非静态方法调用,先实例化这个类
student.say2(); //然后再调用非静态方法
}
}
标签:调用,静态方法,回顾,28,static,Student,public
From: https://www.cnblogs.com/PedroPascal/p/17099927.html