洛奇英雄传 女大剑手法:JAVA程序问题 如何解决,谢谢?

来源:百度文库 编辑:高考问答 时间:2024/05/09 13:47:03
刚学JAVA,我在编译一个程序的时候 程序能够编译成.class文件,但执行的时候出现
Exception in thread "main" java.lang.NoSuchMethodError: main
这样的错误,如何解决?

你的程序没有定义main()方法
加入public static void main(String[] args){
//content
}