main() 方法要用public去修饰,否则 jvm 无法识别到执行入口
第四行开头加上public,重新保存一下再用同样的方法运行就可以了。
主函数使用public static void main试一下
public static void main(String[] args){...}