CE532
Chapter 3

3.7 UNIQUE FEATURES OF JAVA

Java is a special programming language created to expand the user-machine interactivity on the Internet. It allows the users, for example, to play games, run spreadsheets, chat with other users in real time, and obtain continuously updated data on the Internet. The most unique feature of Java compared with other languages is that it allows the web site designer to write special programs, dubbed applet. A Java applet can be safely downloaded by the users using a web browser. The user needs only to have access to a web browser that can interpret and execute Java applets. Java compiler produces a platform-independent bite code that can be interpreted and executed on the browser independent of any user’s machine or its operating system.

An important consequence of the platform-independence of Java is effective distribution of executable programs (Figure 1). A Java programmer does not need to worry about writing various versions of the same program for different machines and operating systems. Users simply download an applet program whenever they need it rather than installing the program on their computer. As such, maintaining, updating, and redistributing the program is done centrally and effectively.

Java applets are executed on the web browser; they are not stored on the hard disk of the computer. Thus, the users do not need to worry about any potential loss of data or damage to the hard disk due to, for example, a virus. As an added safety feature, a Java applet, by default, is not allowed to delete or modify any file on the user’s hard disk or perform other computer crashing operations.

Java is an Object-Oriented Programming (OOP) language with all its desirable characteristics of abstraction, encapsulation, and inheritance (Yu and Adeli, 1991, Adeli and Kao, 1996). Java draws upon features of OOP languages Eiffel, SmallTalk, and C++. Like other OOP languages, C++ is designed to support its predecessor language, C, which is not an OOP language. This adds complexity to its syntax and memory management. In contrast, Java does not provide such back supporting, thus freeing itself of unnecessary complexities.

Java also provides multi-threading. A single Java applet can execute different processes simultaneously, for example loading an image while performing numerical processing. Like symbolic processing languages such as LISP (Adeli and Paek, 1986) Java performs automatic garbage collection, that is the memory no longer in use is released automatically and continuously in the background. This relieves a Java programmer from worrying about memory allocation and de-allocation, a major source of bugs in the computer programs.

Hojjat Adeli, Professor
Department of Civil & Environmental Engineering and Geodetic Science
The Ohio State University 
409 Hitchcock Hall, 2070 Neil Avenue, Columbus OH 43210