DEV Community

VIDHYA VARSHINI
VIDHYA VARSHINI

Posted on

Java Features

Java Architecture For converting a java code to binary code there are two levels. In the first step, the JDK (Java Development Kit) compiles Java source code into bytecode. In the second step, the JVM (Java Virtual Machine) interprets or compiles that bytecode into machine code, allowing it to run on any operating system.

Features:

1. Simple Syntax: Java is straightforward and easy to learn. This removes the complex features like pointers and multiple inheritance making it a good choice for beginners.
Ex:

class Geeks {
    public static void main(String[] args)
    {
        System.out.println("Vidya");
    }
}
Enter fullscreen mode Exit fullscreen mode

Output : Vidya

2. Object-Oriented: Java is purely an object-oriented, meaning it structures software design around data (objects) rather than functions and logic. It fully supports fundamental OOPs concepts like abstraction, encapsulation, inheritance, and polymorphism.

3. Platform Independent: Java is a platform-independent because of Java Virtual Machine (JVM).When we write Java code, it is first compiled by the compiler and then converted into bytecode (which is platform-independent).This byte code can run on any platform which has JVM installed.

4. Interpreted: Java code is not directly executed by the computer. It is first compiled into bytecode. This byte code is then understand by the JVM. This enables Java to run on any platform without rewriting code.

5. Scalable: Java can handle both small and large scale applications. This provides features like multithreading and distributed computing that allows developers to manage loads more easily.

6. Portable: When we write a Java program, the code first get converted into bytecode and this bytecode does not depend on any operating system or any specific computer. We can simply execute this bytecode on any platform with the help of JVM.

7. Memory Management: Memory management in Java is automatically handled by the Java Virtual Machine (JVM). Java garbage collector reclaim memory from objects that are no longer needed.Memory for objects are allocated in the heap. Method calls and local variables are stored in the stack.

8. Multithreading: This allows multiple threads to run at the same time. It improves CPU utilization and enhancing performance in applications that require concurrent task execution. Multithreading is especially important for interactive and high-performance applications, such as games and real-time systems.

9. Rich Standard Library: Java provides various pre-built tools and libraries which is known as Java API. Java API is used to cover tasks like file handling, networking, database connectivity (JDBC), security, etc. With the help of these libraries developers save a lot of time and ready to use solutions and can also build a powerful application.

10. Support for Mobile and Web Application: Java provides support for both web and mobile applications.

For web development,this offers technologies like JSP and Servlets, along with frameworks like Spring and Springboot, which makes it easier to build web applications.
For mobile development, this is the main language for Android app development. The Android SDK uses special version of Java and its various tools to build mobile apps for Android devices.

Top comments (0)