# Java Notes

# Applications - text example

The programs that you normally run are called applications. A typical MS Windows application has an extension of .exe, but in Java it will usually end with a .class or .jar extension. Applications, as opposed to applets for example, must have is a main method. Here is a simple application that writes one line. It has no graphical user interface (GUI), but simply prints one line to the console (eg, DOS) screen. All further examples will use a GUI, which is only slightly more complicated.

    // Write a one-line greeting.
    // Mickey Mouse 2000-10-24

    public class Greeting {
        public static void main(String[] args) {
            System.out.println("We come in peace.");
        }
    }