Skip to main content

Command Palette

Search for a command to run...

Features of java

Published
2 min read

Some of the important features of java:

1.Platform Independent

2.Simple

3.Object oriented

4.Secure

5Robust

6.Multithread

7.Portable

8.High Performance

Platform Independent

Java program can run any system that has java virtual machine and the principle it follows ” Write Once ,Run Anywhere”(Works on different operating systems without changing the code)

To develop any java program , we use the Java Development Kit(JDK).It includes the compler , tools and JVM to execute the program

JVM (Java Virtual Machine)

When a Java program is compiled, it is converted into bytecode. The JVM reads this bytecode and converts it into machine code so the computer can understand and execute it.

Every operating system has its own JVM, the same Java program can run anywhere.

JDK (Java Development Kit)

It is a package that provides tools needed to develop Java programs.

JDK includes:

  • Compiler (javac) → Converts Java code into bytecode

  • JVM → Runs the Java program

  • JRE (Java Runtime Environment)

  • Development tools

Without JDK, we cannot write or compile Java programs.

Simple

Java is considered a simple programming language, which means it is easy to learn and use. Its syntax is simple and similar to C++, but it removes complex features like pointers, operator overloading, and multiple inheritance. Java also performs automatic garbage collection.

Object oriented

Java is an object-oriented language, using classes and objects with features like inheritance, polymorphism, abstraction, and encapsulation.

Unlike C++, Java does not allow multiple inheritance with classes, which makes code simpler and easier to read. Multiple inheritance can be achieved safely using interfaces.

Secure

Java provides a secure environment by not allowing direct access to memory. It uses references, garbage collection, and a security manager to protect programs from unauthorized access.

Robust

Java is robust and reliable. It handles errors using exception handling and automatically manages memory with garbage collection.

Garbage collection

It is the process by which Java automatically removes objects that are no longer needed from memory which helps free up space and prevents memory leaks, making programs more reliable

Multithreaded

Java allows multiple tasks to run at the same time using threads, improving program performance.

Portable

Java programs can run on any system without modification, By usingJVM.

High Performance

Java achieves good performance with the Just-In-Time (JIT) compiler, which converts bytecode into machine code at runtime.