I’m new to Java and tried to get things running on my computer.
A simple “hello world program” fails calling a method
class helloworld
{
public static void main(String[] param)
{
helloWorld();
System.exit(0);
}
public static void helloWorld();
{
System.out.println("hello world");
}
}
I get the following error:
.\helloworld.java:11: error: missing method body, or declare abstract
public static void helloworld();
^
Remove the semicolon on the end of this line:
public static void helloWorld();