Java Tutorial

Basic Concepts

Object Oriented Concepts

Coming Tutorials

>Home>Java Tutorial>Features of Java Language

Java Tutorial

Basic Concepts

Object Oriented Concepts

Coming Tutorials



What Are Features or Properties of Java Language

Simple:-

The Java is simple because there are not complex syntaxes, any C++ or other object oriented programmer can easily understand the Java syntaxes. There are no explicit pointer and operator overloading concepts in java. Read Java vs C++.

Object Oriented:-

Java follows the Object Oriented Programming Model; we cannot write a java program without a class therefore java is an Object Oriented programming language. Java implements the Object Oriented concepts like Abstraction,Encapsulation,Inheritance,and Polymorphism.

Platform Independent and Architecture Neutral:-

Java Compiler converts the source code into the byte code, that byte code is platform independent and architecture neutral, means the java compiler does not consider the underlying operating system and processor architecture while creating the byte code. Once we compiled the java source code we do not need to recompile the same code on another machine, this makes java Write Once Run Anywhere (WORA).

For instance, if we developed and compiled a program on the Windows operating system, then the created byte code (.class file) can be run on other operating systems like Linux or Mac without recompiling the same program.

Portability:-

The byte code of the java programs is platform independent and architecture neutral, therefore we can easily run the same byte code on different platforms. For instance, we can develop and compile a java program on Linux operating systems and the compiled byte code can be easily run on any operating systems like Windows, Macintosh, etc. because of this we can easily port the java program on different computers.

Portability= Platform Independent + Architecture Neutral.

High Performance:-

Java JVM uses the Just In Time compiler (JIT)which converts the similar statements from byte code to processor dependent machine code at a time, this reduces the processor time consumption to run the program and achieves high performance.

Multithreaded:-

Java program can implement the multithreading concept. In fact every java program has two threads, one is main thread which is responsible to run the program and there is a background daemon thread which is called Garbage Collector which is responsible for destroying the unused objects to free the memory.

Secure:-

Java does not support the explicit pointer and pointer arithmetic.

Ex. Explicit pointer :- int *ptr= &a;

Ex. Pointer Arithmetic:- ptr++, ptr--

Using pointer arithmetic one can easily access the value of other memory locations which can be the security loop hole.

Other reason of java being secure is, to run the program Java does not use runtime environment of underlying operating system like C++ uses, and instead it uses its own runtime environment that is JRE – Java Runtime Environment.

Robust:-

The java is more robust than other programming languages because java has inbuilt Garbage Collection feature implemented, therefore the possibility of the java program running out of memory is very low.

Java has strong error handling mechanism; java force the programmer to handle the exceptions at compile time, so the chances of raising exceptions at run time is less.

Distributed:-

The Java can be used to develop the distributed applications using the concepts like RMI, EJB, etc. A distributed application is one in which there can be multiple clients and multiple servers to serve the requests of these clients. If a server faces any technical problem then the remaining servers will serve the clients request; therefore client will never face problem of server unavailability.

Interpreted:-

The java is highly interpreted programming language means that it does not require operating system`s runtime to convert byte code to machine code. The Java has its own interpreter to convert the byte code into processor dependent machine language.

Share the article to help your friends