Features of Java
Java consists of multiple features which makes it highly useful in many applications.
Some of the main features of Java are:-
1) Object-oriented
2) Simple to understand
3) Platform independent
4) Multithreaded
5) Portable
6) Architecture neutral
7) Secure
8) Distributed
9) Robust
10) High Performance
11) Dynamic
12) Interpreted
Figure showing different features of Java
Let's see the brief description of the above features:-
Object-Oriented :
Java is object-oriented because it supports oops concepts(object, class, inheritance, polymorphism, encapsulation, abstraction).but then also it is not a pure object-oriented language because it supports primitive data. oops, concepts help programmers to manage data by making relationships between objects, the behavior of objects, hiding of data, etc.
Simple to understand:
Java is really simple to understand. its syntax is simple and we can start developing programs in notepad. some IDEs are also available for building big java applications. Apart from this, it does not contain pointers which are really difficult to understand for beginners in programming. apart from this Java does not supports multiple inheritances and operator overloading.
Platform independent:
One of the most important features of Java is platform-independent. It means the Java program can run on multiple platforms like Windows, Linux, Solaris, etc. but we have to install JDK as per the operating system. if we use Linux operating system then we need to install JDK which supports Linux OS.this feature gives us reliability to use the same java application on multiple platforms.
Multi-threaded:
We can execute multiple tasks in parallel by using threads.Java allows multi-threading, which means multiple tasks can run in parallel. Threads share memory which is helpful in-memory optimization. We can improve the performance of any java application by multi-threading.it saves time and can increase performance. We will see threads in detail in the thread section.
Portable:
If Java code is written on one platform it can run on other platforms also. this feature of java makes it portable in use. if we make a java program in the windows operating system, After compiling that program .class file will be created. that .class file can run on Linux operating system also or if we make a java program in Linux operating system. we can use compiled .class files in the Windows operating system too.
Architecture Neutral:
One of the most important features of Java is an architecture-neutral language that means it is not bound to some particular architecture. since the java compiler generates byte codes that can suit any architecture. The compiled code can be run on any processor.
Figure showing .class file can run on any processor.
High Performance:
Because of just in time compilation technique in JVM, the performance of java is high although it is slower than c,c++ in speed. By using the garbage collector mechanism we can collect unused objects which can increase performance.
Secure:
Because of the sandbox security mechanism, java applications are secure. since java does not pointers that are unsafe, adds the security in java.Java also has an exception handling mechanism makes to handle exceptions during programming makes it safe. Byte code generated by the compiler(we will study in a later section) is checked by JVM for virus attack makes it secure.
Distributed:
We can share data on the network by Java.java.net package consists of numerous classes to send or receive data over the internet. The use of networking protocols like HTTP and FTP enables the transfer of data over the internet.
Robust:
Robust simply means powerful. since java does not use pointers makes it robust. Other key features like Strong memory management and garbage collection make java a robust language.
Dynamic:
Since java loads byte codes at run time, therefore we can say java is a dynamic language.
Interpreted:
The byte codes which are created by the compiler are feed to the interpreter, which decodes and converts byte code for JVM.it is part of JVM actually. other operations like loading, verifying and execution of code are also done by JVM.
No comments:
Post a Comment