When I named the class and method both HelloApp, it worked.
public class HelloApp {
/**
* @param args the command line arguments
*/
public static void HelloApp(String[] args)
{
System.out.println("Hello, World!");
}
}
--- Update ---
Create a new project. Select Categories = Java and Projects = Java Application.
Project Name = Dummies
Enable the "Create Main Class" checkbox. Accept the default 2-part name convention. The first instance of "dummies" is the package name. Change the second instance to "MainClass". Click the [Finish] button. Now, create a new class at the package level named "HelloApp". The program will look as follows:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package dummies;
/**
*
* @author dianamecum
*/
public class HelloApp {
public static void main(String[] args)
{
System.out.println("Hello, World!");
}
}