Java has many features over other programming languages. The following are some of the features of Java programming language:
- General Purpose
- Object oriented
- Platform independent
- Architectural Neutral
- High Performance
Java was originally designed to be easy and simple. Java is the powerful and flexible programming language of all other programming languages. Java has the simplest syntax. C++ programming language is the base of the Java programming language.
The applications of Java are not limited they can be used for many purposes and hence Java is called a general purpose programming language. Java can be used for writing software. The programs written in Java programming language can be run on a number of platforms without recompiling the source code. The binary files of Java are in a form of byte codes. Many of the syntax in Java programming language are brought from C and C++ programming languages. Java is a client server based programming language.
Object oriented programming is a technique through which the programs are organized. The program becomes more flexible. A modular program is obtained when using the object oriented programming. By modular programs we mean the programs that are divided into small modules or functions. The Java’s object oriented programming concepts are mainly inherited from C++ programming language.
The object oriented programming with Java supports the following basic concepts, Object, class, Inheritance, Polymorphism, Abstraction and encapsulation.
Platform independence is considered to be one of the most significant advantages that Java has over other programming languages. Platform independence means that a program written in one computer can be moved to the other computer. As Java is an object oriented programming therefore, the classes in Java makes the code easy to write hence we can easily transfer our source code from one platform to another platform.
In Java the binary files are also platform independent. This means that they can be run on a number of platforms without recompiling the source code. The binary files of Java are in a form of byte codes. Byte codes are a set of instructions that looks like a machine code.
Java provides security unlike other programming languages. In Other programming languages the programs can interact with the operating system but the programs that are written in Java have an extra security that is Java programming language puts JVM between the operating system and the program.
By Robust we mean that Java is a programming language that can cope with the error during the execution of the program. Java makes it happen to eliminate the errors. Robust means strong and because of lack of pointers in Java the programming language has less security problems and has a strong management of memory. Java is made robust because of the exception handling and type checking mechanism.
The code written in Java does not depend on the processor Architecture for example the source code of Java written in 64 bit architecture can be run on the 32 bit architecture. There is not hard and fast rule for the size of the primitive data types and this is the reason that the Java source code can be run on other systems too.
As the Java is platform independent therefore, the programs written in one machine can be run on anther machine and hence Java is called portable programming language.
The Java programming language is referred as more dynamic than other languages such as C and C++. Java can execute a number of behaviors of programs at run time.
The Java programming language is a compiled programming language in which the programs are compiled into the byte codes, the Java byte codes are then interpreted to run the program.
A Java development environment has two parts that is a Java compiler and a Java interpreter. The compiler of Java takes the Java program and then generates byte codes. In other programming languages such as C, C++, the compiler takes the program and then generates a machine code. But this is not with the Java compiler.
A Java program is then run by the Java interpreter and to run the program in Java the byte code interpreter is run.
Java makes has a just in time compiler for high performance. A just in time compiler is that, that converts the byte code of java into the instructions that can be directly sent to the compilers.
Java supports the distributed system. The distributive system means that we can have the access of the files over internet. These files can be accessed by simply calling the methods.
In Java a thread is referred to as a single independent program. The Java programming language supports multithreading this means that the Java programs can perform multiple tasks at a time.