I am just beginning to learn Java and I want to make sure my compilers are fixed up and function correctly. Here is some source I got to check it:
/**
* The HelloWorldApp class implements an application that
* simply displays "Hello World!" to the standard output.
*/
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); //Display the string.
}
}
Now I put this into my compilers (Terminal, MRJAppbuilder, JJedit) and they all compile. Then they make the .class file. Then when I run it I need a main-class. What would I need to do in this situation? Sorry for my stupidity...
/**
* The HelloWorldApp class implements an application that
* simply displays "Hello World!" to the standard output.
*/
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); //Display the string.
}
}
Now I put this into my compilers (Terminal, MRJAppbuilder, JJedit) and they all compile. Then they make the .class file. Then when I run it I need a main-class. What would I need to do in this situation? Sorry for my stupidity...