0% found this document useful (0 votes)
8 views3 pages

Features of Java

The document discusses the various features of the Java programming language including that it is simple, platform independent, secure, object-oriented, robust, distributed, supports multithreading, portable, architecturally neutral, dynamic, and provides good performance.

Uploaded by

Shweta Gajre
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
8 views3 pages

Features of Java

The document discusses the various features of the Java programming language including that it is simple, platform independent, secure, object-oriented, robust, distributed, supports multithreading, portable, architecturally neutral, dynamic, and provides good performance.

Uploaded by

Shweta Gajre
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 3

Features of Java

Following are some of the useful and advanced features of java:

1. Simple

Java is a very simple programming language, it is easy to learn, read and write in Java. The
syntax of Java is clean and easy to understand.

Here’s why java is simple programming language compared to other popular programming
language:

 Java syntax is similar to C/C++ so it is easier to learn java if one is familiar


with C or C++. However java doesn’t use the complex features of C and C++
such as Pointers, go to statements, preprocessors/ header files, multiple
inheritance, operator overloading etc.
 There is no need to remove unreferenced objects explicitly as there is an
Automatic Garbage Collection in Java.

2. Platform Independent

Java is a platform independent language. Compiler(javac) converts source code (.java file) to
the byte code(.class file). JVM executes the bytecode produced by compiler. This byte code
can run on any platform such as Windows, Linux, Mac OS etc. Which means a program that
is compiled on windows can run on Linux and vice-versa.

Each operating system has different JVM, however the output they produce after execution of
bytecode is same across all operating systems. That is why we call java as platform
independent language.

3. Secure

Security is one of the biggest concern in programming language as these programming


langauges are used to develop some of the critical and sensitive applications that needs to be
secured such as banking applications. Java is more secure than C/C++ as does not allow
developers to create pointers, thus it becomes impossible to access a variable from outside if
it’s not been initialized.

We don’t have pointers and we cannot access out of bound arrays (you get
ArrayIndexOutOfBoundsException if you try to do so) in java. That’s why several security
flaws like stack corruption or buffer overflow is impossible to exploit in Java.

4. Object-Oriented Programming language

Object oriented programming is a way of organizing programs as collection of objects, each


of which represents an instance of a class.
4 main concepts of Object Oriented programming are:

1. Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism

5. Robust

Robust means reliable. Java programming language is developed in a way that puts a lot of
emphasis on early checking for possible errors, that’s why java compiler is able to detect
errors that are not easy to detect in other programming languages.

The main features of java that makes it robust are:

1. Garbage collection,
2. Exception Handling
3. Memory allocation.

6. Distributed

Using java programming language we can create distributed applications. RMI(Remote


Method Invocation) and EJB(Enterprise Java Beans) are used for creating distributed
applications in java.

In simple words: The java programs can be distributed on more than one systems that are
connected to each other using internet connection. Objects on one JVM (java virtual
machine) can execute procedures on a remote JVM.

7. Multithreading

Java supports multithreading. Multithreading is a Java feature that allows concurrent


execution of two or more parts of a program for maximum utilisation of CPU.

8. Portable

As discussed above, java code that is written on one machine can run on another machine.
The platform independent byte code can be carried to any platform for execution that makes
java code portable.

9. Architectural Neutral

As we know Java is a platform independent language, which means program written and
compiled on one machine can run on any other machine having different operating system.
Java follows the principle of “Write once run anywhere“
Compiler converts the java file into byte-code and this byte code is machine independent,
java virtual machine can easily translate this byte code into machine specific code. This
makes java architectural neutral programming language.

10. Dynamic

Java is a dynamic programming language. OOPs allows developers to add new classes to the
existing packages, add new methods to the existing classes as well as modifying the method
without changing the original method code by using the concept of method overriding.

All these features make java dynamic. It also allows classes to be loaded on demand. It also
supports functions from its native languages such as C and C++.

12. Performance

Java is significantly faster than other traditional interpreted programming languages.


Compiled java code which is known as byte code is like a machine code, that allows a faster
execution. Java uses Just in Time compiler which can execute the code on demand, this
allows to execute only the method that is being called, which makes it faster and efficient.

Also java uses the concept of multithreading, which allows concurrent execution of several
parts of the code at the same time. This provides high performance.

It is still a little bit slower than a compiled language (e.g., C++). Java is an interpreted
language that is why it is slower than compiled languages, e.g., C, C++, etc.

You might also like