Let's look at our first Java program together!
Can you predict what will happen?
public class HelloJava
{
public static void main( String[] args )
{
System.out.println( "Hello, Java!" );
}
}
In the command line, we will run:
javac HelloJava.java
This compiles the source file and (if all goes well) creates a class file HelloJava.class.
To run the program, we execute the command:
java HelloJava