Features of Java: First Platform Independent Language

Simple, Pure Object Oriented, Robust, MultiThreading, Secure, Distributed, Portable & High Performance

Harsh Gupta - Tech Writer
Java was introduced by James Gosling at Sun Microsystems in 1995. Java being a pure object oriented language is mainly used because of its Portability, a feature that makes java independent of an operating system allowing the Java code to run on any platform without the need to recompile the source code. Java's source code is compiled to byte code and can run on any operating system using JVM (java virtual machine).

Few people say that Java is similar to C++ but that is completely wrong. Java is an advanced version of C++, and as such it is simpler and easy to learn as in comparison to C++. Also, it includes many more features that are not available either C or C++.

Brief History about Java

James Gosling first named the language as 'OAK' after the name of an oak tree planted outside his office and then renamed it as 'GREEN' and finally ended up with the word 'Java'.

Sun Microsystems first released the Java version 1.0 in 1995. This version supported several security features like network access, distributed environment, file-access restrictions along with support for applets that were designed to run on web pages.

With the popularity of Java 1.0, Sun Microsystems decided to launch another version of Java as Java 2. This new release was named as J2SE 1.2 and launched in December, 1998. In 2006, for marketing purposes Sun Microsystems decided to rename new java versions as Java EE (Enterprise Edition), Java ME (Mobile Edition) and Java SE (Standard Edition) respectively.

Features That Made Java Popular

Java perfectly survived the worldwide market by following the 5 Point Strategy that ensured:

1. The language was simple, object oriented and easy to learn.

2. It resulted in high performance.

3. It was robust and secure.

4. It was interpreted, multi-threaded and dynamic.

5. It was architectural neutral and portable.

Let us discuss these features in detail.

Simple

Java was designed in such a way that it was very easy for a new user to learn and use the language. For an existing programmer, it was quite easy to learn the language as it followed the basic concepts of any other object oriented language.

Object Oriented

Java is a pure object oriented language as it deals with only objects and classes. Often there is a debate regarding Java being a pure object oriented language or an object oriented language or an object based language.

Java is not an Object based language.

As far as object oriented is concerned Java is a pure object oriented language. An object oriented language must have all the features like encapsulation, abstraction, polymorphism, inheritance and dynamic binding. For a language to be pure object oriented it should emphasize objects and message passing between objects. Java does include all these features and that is why, it is pure object oriented.

Question: You might ask that C++ also include all those features then why is it not object oriented? Also, you mentioned that a language should deal with only objects and classes, but Java supports primitive data types like integer, float, etc.

Answer: C++ doesn't emphasize objects and message passing between objects. That is why, it is object based and not object oriented.

Java supports primitives only to provide support for older applications otherwise it can lead to trouble. However, Java does make use of wrapper classes to convert primitive data types to non-primitive data types. It is the language that implements the concept that everything is an object.

Robust

The term 'Robust' refers to answer logically in case of wrong input and answering expectantly in case of right input. In simpler words, robustness defines the ability of a program to perform well under unexpected conditions.

Java is a robust language as it includes proper exception handling mechanism to handle the problems that might occur or make the program incompetent.

Distributed

Java was designed for use in distributed environment and is a highly preferred language for client/server client/server programming as it supports an abstraction level for the client/server programming.

This feature allows the objects to remotely run the procedure on different computers in a network. This type of interface is called RMI (Remote Method Invocation).

Multithreaded

Java supports multithreading a feature that allows multiple tasks to be performed at the same time. A thread is the smallest unit of processing and even in an operating system various system level tasks are carried out in terms of threads.

With multi-threading you can perform one task and simultaneously perform another without disturbing the other threads. This process is called synchronization and is handled automatically by the JVM.

Portable

Portability was the feature that people were thriving for and Java became their savior. Portability was the feature that played a great role in the success of Java. Java uses a special mechanism whereby the source code is converted into byte code.

Byte code is a special set of instructions that is partially interpreted and can be run on any machine with the help of JVM (Java Virtual Machine).

This partially interpreted code referred to as the byte code could then be ported to any platform independent of the architecture of the system. Until now no language except Java has been able to achieve platform independence.

Interpreted

An interpreted code is one that can be understood by the machine. An interpreted code is written in terms of 0 and 1, the binary language understood by the computer.

Java is known to be an interpreted language as the source code is compiled only once and the resulting byte code can be run on any machine using JVM. Also, most of the work is done at compile time so a very little is left at runtime allowing the code to execute in the least possible time.

High Performance

Java achieves high performance using a technology called 'Java HotSpot'. With Java HotSpot most of the work is done at compile time and very little is left during the execution of the program. Java hotspot technology reduces the execution time of any java code providing the high performance required by any programmer.

Also, java code is first converted to byte code, which then gets executed every time the program is run. This byte code which is similar to machine code gets executed in the least possible time providing high performance.

Architecture Neutral

Java is independent of the operating system. What about the architecture of the system? If the program runs once then is it necessary that the same code will run the next day? Is the code independent of the processor or the system?

The answer to all these questions is yes. The Java is architecture independent. If you run a code on one machine the same code will get executed on another irrespective of the architecture of the system.

It was the dream of java creators to achieve the objective of "Write once, run anytime, anywhere, and forever" and they did achieve their objective to some extent.

Published by Harsh Gupta - Tech Writer

I am a part time freelancer and writing is my hobby Some of my websites: http://www.GenericArticles.com http://www.JailBreakingiPhone.com  View profile

  • Java is a pure object oriented language as it deals with only objects and classes.
  • Java supports multithreading a feature that allows multiple tasks to be performed at the same time.
  • Java achieves high performance using a technology called 'Java HotSpot'
Java is independent of the operating system. What about the architecture of the system? If the program runs once then is it necessary that the same code will run the next day? Is the code independent of the processor or the system?

To comment, please sign in to your Yahoo! account, or sign up for a new account.