Java programs consist of applications and applets. Java applications are stand-alone programs and typically executed using the Java interpreter. On the other hand, Java applets are executed in a web browser or in a special window known as the Appletviewer; however, the compilation stages of both are the same.

The structure of applets differs from that of application programs; for example applets do not have the main () method. Applets do not interact with the console operations (that is, I/O operations) like application programs do. Applets allow the user to interact through the AWT .

Applets differ from applications in the way they are executed. An application is started when its main () method is called. In the case of applets, an HTML file has to be created, which tells the browser what to load and how to run the applet. Java, however, allows a programmer to create software code that can function both as a Java application and as a Java applet using a single class file. Table illustrates the similarities and differences between Java applications and applets.