In this section, we are going to discuss about the features of java programming language.
You can also refer our video tutorial for same.
So let’s start with this tutorial :
Features of java
These are some most important features of Java programming language.
- Object Oriented
- Platform Independent
- High Performance
- Architectural Neutral
Now we will discuss above mention features of java programming languages in detail.
Features of Java
1. Simple :
Java language is very simple and easy to learn, use and memories as it use the syntax of c and c++. It resolve the complexity of c++ language by removing pointers and operator overloading. In java we don’t have to write destructor for unused memory area, there is garbage collector.
2. Object Oriented :
Java is object oriented programming language as it follow the oop’s concept which include:
1. Class :
class is the collection of similar type of object or it can be defined as a blueprint of object.
2. Object :
Object is an instance of class. Object is the product of class. It can be defined as the memory allocation allocated by the JVM during runtime.
3. Encapsulation :
Encapsulation means wrapping of data and action on that data (method) into a single unit. In java, a class consists of two thing- data and behavior (method). If we hide the data and provide method to access the data, that is the encapsulation. In sort, Hiding of data is called encapsulation.
4. Abstraction :
Abstraction is defined as the hiding of implementation from the user. This can be achieved by defining the class Abstract or preparing interface.
5. Polyporphism :
Polymorphism can be defined as using same resource ( say function) for different purpose.
Ex:-Using draw () function to draw circle, square and triangle etc. this can be achieved by function overloading and function overriding in java.
6. Inheritance :
In short, it is the mechanism in which a class acquire the properties(variable and methods) of another class. The class that acquires the property is known as subclass and the other class is known as super class. It is basically used to reuse the code.
Ex: – Son acquires the properties of his father. Here son is the sub-class and father is the super class.
3. Robust :
Robustness means ability to deal with abnormal situation or it indicate the strength. Java provides the mechanism of exception handling and type checking which make the java strong enough to deal with such abnormal situation. It has strong dynamic memory management.
4. Platform Independent :
Java is a cross platform language. Java is based on the concept of WORA that means, We can write a java program once and can run it on any platform such as windows, mac, ios, linux. When we compile a Java program, it produced a byte code that is also called as intermediate code. This byte code (intermediate code) is executed by JVM (java virtual machine), and JVM is available for all the platform.
5. Secure :
Java is most secure type of programming language as java program run inside the memory area of JVM. Java program does not directly interact with OS memory. Java program is compiled into byte code and the execution of this byte code is done by the JVM, so JVM take the responsibility of security. Java eliminates the use of pointers for memory management. Pointers can often cause data leaks to unauthorized applications. This is rare in the case of java (but yes, it is possible). Automatic garbage collection also plays a role here.
6. Multi – Threading :
Java multithreading feature makes it possible to write program that can do many tasks simultaneously. Multi-threading means to run the multiple thread simultaneously. A thread is a light weight sub process which shares the common memory. The cost of communication of thread is very low so it reduces the response time.
EX:- you could be listening to an audio clip while scrolling the page and in the background downloading an image.
7. Portable :
Since Java code is compiled to byte code and we can carry these byte code on any platform because these byte code is executed by JVM and JVM is not specific to any platform. So java is portable language as we can carry the byte code on any platform.
8. Dynamic :
Java support dynamic memory allocation and automatic memory management. In java, classes can be load on run time, so java is a dynamic programming language as compared to c and c++.
9. Distribute :
Java is a distributed programming language as it provide the RMI (remote method invocation) and EJB (enterprises java bean) to develop the distributed application. This feature allows us to access a file by simply calling a method from any machine.
10. High Performance :
Java is an interpreted language, so it will never be as fast as a compiled language like C or C++. But, Java enables high performance with the use of just-in-time compiler.
11. Architectural Neutral :
Compiler generates byte codes, which is executed by JVM and these byte codes have nothing to do with a particular computer architecture, hence a Java program is easy to interpret on any machine.
If you found this post useful, don’t forget to share this with your friends, and if you have any query feel free to comment it in the comment section.
Thank you 🙂 Keep Learning !