Programming in Java

You can use Java to create two types of programs: 

  • Application
  • Applet 


An Application is a programm that you can execute at the command prompt. Stand-alone applications can either be window-based applications or console applications. Window-based applications have a graphical user interface (GUI). Such applications use features supported by platforms like Microsoft Windows, Macintosh, Motif, and OS/2.Console applications are character-based applications lacking a GUI. A standalone application uses the resources of a single computer while a network application uses the resources available over a network. Distributed applications can access objects that execute across many computers over a network. Applications can read and write to the files on a local computer. Applications can also establish network connections, access resources across a network, and launch applications over a network. A stand-alone application is stored on the hard disk of a computer. When you execute the application, it is retrieved from the hard disk into the internal memory and executed. It is also called Stand alone programming. A stand-alone application is a program that runs on its own, without depending on a Web browser. You've been writing stand-alone applications all along. Any class that has a main() routine defines a stand-alone application; running the program just means executing this main() routine.


Applets are Java programs that execute within a Web page. Therefore, unlike applications, applets require a Java-enabled browser like Microsoft Internet Explorer 4.0 or later version. An applet is loaded and executed when a user loads a Web page, which contains the applet, through a Web browser.