更新时间:2022-06-21 06:38:18
你的 main 方法应该是 static
Your main method should be static
public static void main(String[] ar)
当JVM调用主类时,它不会创建类的实例,它只是加载类并调用static
main()
方法
When JVM invokes main class it doesn't create instance of the class, it just loads the class and invokes static
main()
method