Ask Questions?

View Latest Questions

Advertisement


 
 

Applications - text example
Posted on: July 26, 2006 at 12:00 AM
A typical MS Windows application has an extension of .exe, but in Java it will usually end with a .class or .jar extension.

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.");
    }
}
Copyleft 2003 Fred Swartz MIT License, Last update: 2002-01-06
Advertisement


DMCA.com