import java.awt.*;

// this is the first Java application
public class Test {

    public static void main (String [] args) {
        System.out.println("Hi there!");
        System.out.println("Welcome to CSci 1211!!");
    }

}

To run (on Windows):
  1. Copy the code into a file Test.java in a directory on C drive.
  2. Open Command Prompt window. Go to the folder where your programs are: cd C:\myprograms (replace myprograms by the folder where you copied the files).
  3. Compile the code: javac Test.java in the Command Prompt window.
  4. Run it by command java Test.

This is an example from CSci 1211 course.