Comparison of Java with other Technologies
| Features | Java | C | C++ | PHP | Dot Net |
|---|---|---|---|---|---|
Paradigm |
OOP | Procedural | Procedural, OOP, Generic | OO | OOP |
Form of Compiled Source Code |
Java bytecode | Executable Native Code | Executable Native Code | php code | Executable Code |
Memory management |
Managed, using a garbage collector |
Manual | Manual | manual | Through Encapsulation |
Pointers |
No pointers | Yes, very commonly used. | Yes, very commonly used, but some form of references available too. | No pointers | No pointers |
Preprocessor |
No | Yes | Yes | No | No |
String Type |
Objects | Character arrays | Character arrays, objects | Character Array | Character Array |
Complex Data Types |
Classes | Structures, unions | Structures, unions, classes | - | Structure, Enum, Classes |
Inheritance |
Java does not support multiple inheritance | N/A | Multiple class inheritance | - | Not Supported |
Operator Overloading |
No | N/A | Yes | Yes | Yes |
Goto Statement |
No | Yes | Yes | Yes | Yes |
Machine Dependent |
No | Yes | Yes | Yes | No |
Platform Dependent |
No | Yes | Yes | Yes | Yes |
History of Java
In 1991, a small group of Sun engineers called the "Green Team"
believed that the next wave in computing was the union of digital
consumer devices and computers. Led by James Gosling, the team
worked around the clock and created the programming language that
would revolutionize our world - Java.
Green Project (1991)was designed for hand-held devices and set-top boxes. (Requirement was the hardware in the consumer devices was always changing but the same code use on the different hardware systems)- It was originally named as
Oakbut became unsuccessful, so in 1995, Sun changed its name toJAVA - James Gosling's goals were to implement a virtual machine
and a language that had a familiar
C/C++style of notation. The first public implementation wasJava 1.0 in 1995. - It promised "Write Once, Run Anywhere" (WORA).
floppy. Now it is of 85+MB.
Java History in Brief
JDK, JRE and JVM
- A Java Developement Kit (JDK) is a software package which is used to develop and deploy java applications.
- A Java RunTime Environment (JRE) is required to run Java applications interpretively on a target hardware and operating system platform.
- A Java virtual machine (JVM) is a virtual machine that can execute Java bytecode. It is the code execution component of the Java platform.
1. JDK (Java Development Kit)
JDKis a software package which is used to develop and deploy java applications.javac compiler- it is use to convert .java file into .class fileJAR Files-are Java libraries , which contains number of classes and interfaces modularized for specific functionalities. For example, to make a database connection with database will requireojdbc.jar.Javadoc- through this utility we can make Java documentaion for any java program.Jdb- jdb is a java debugger.JRE-Java Runtime Environment
JDK = javac compiler + .jar (libraries) + javadoc + jdb + JRE
JDK consists
2. JRE (Java Runtime Environment)
- A JRE is required to run Java applications
interpretivelyon a target hardware and operating system platform.
JRE = JVM (Java Virtual machine)+ jar files (libraries)
3. JVM
JVMis a software that is plat form specific.- For example for Linux platform will require a
Linux based JVM, for windows platform will require awindows based JVM. - Now in these days JVM is
bundledwith Internet explorer and With other types of browsers.
A JVM performs the following tasks
Class Loader- Load all the .class file, necessary for the execution of a program.Byte code Verifier- It ensures the code does not no illegal data conversion, no stack over flow, not violate system integrity.JIT(Just In time compiler)- JIT work as a cache for the JVM interpreted code. It memorized the repeated code instructions (that is interpreted by the JVM) and when JVM reqiure the same set of instructions so JIT provides these instructions to the JVM , so JVM does not interpret the same instructions againGenerate Native Code- The JVM and the Java API are built for every O/S platform. The Java API calls to the O/S API.



