Java is a general-purpose, object-oriented programming language. We can develop two types of Java programs :
Stand alone Applications : Programs written in Java to carry out certain tasks on a stand alone local computer. Executing stand alone java programs involves two steps
(a) Compiling through javac compiler.
(b) Executing the byte code using java interpreter.
Web Applets : Programs that are developed for Internet based applications. An applet located on a distant computer (Server) can be downloaded via Internet and executed on a local computer (Client) using a java capable browser.
From the user’s point of view, Java applications can be compared to compiled C programs since they are started from a command line just like any compiled program would be started. However, there is a major difference: Java applications, as well as applets, are interpreted. Applications are started on the command-line by calling the Java Interpreter with the name of the application as an argument.
Applets, in contrary to applications, are small programs which can be included in web pages and run inside the user’s browser. Alternatively, applets can be run in the applet viewer that comes with the JDK, which has advantages for debugging.