Monday, September 29, 2008

What is Java

Java


Java An object-oriented programming language that is platform independent (the same Java program runs on all hardware platforms without modification). Developed by Sun, Java is widely used on the Web for both client and server processing. Modeled after C++, Java added programming enhancements such as "garbage collection," which automatically frees unused memory. It was also designed to run in small amounts of memory. The first Web browsers to run Java were Sun's HotJava and Netscape Navigator 2.0.

Applets, Applications and Servlets

Java programs can be called from Web pages or run stand alone. When launched from a Web page, the program is called a Java "applet." When a non Web-based Java program is run on a user's machine, it is a Java "application." When running in a Web server, it is a Java "servlet."

Intermediate Bytecode

The source code of a Java program is compiled into an intermediate language called "bytecode," which can reside on any hardware platform. In order to run the bytecode, it must be compiled into machine code either ahead of time like a C/C++ program, just before it is needed or via a Java Virtual Machine (JVM), which is a line-at-a-time interpreter. There are compilers and JVMs for all major hardware platforms, and the intermediate bytecode is what makes Java machine independent.

No comments: