How to fix Java Erorr Message
我在我的电脑上安装了Java,但是当我运行任何Java程序时,它说错误。我尝试了下面的代码
public class Main { public static void main(String[] args) { System.out.print("This is just an example..."); } }
The code you have does not have any problem at all.
public class Main
{
public static void main(String[] args)
{
System.out.print("This is just an example...");
}
}
Possible error would be the FileName.java, make sure that it is Main.java
because Classname must be identical to the File Name.
上一篇: 如何从Java类加载变量到不同的类
下一篇: 如何解决Java Erorr消息