DEV Community

A Ramesh
A Ramesh

Posted on

Java Introduction....(Java Features and Architecture – Simple Explanation)...

Java Features (Easy Points):

  1. Simple
    Java is easy to learn and understand.

  2. Object-Oriented
    Everything in Java is based on classes and objects.

  3. Platform Independent
    Java code runs on any system (Windows, Linux, Mac) using JVM.

  4. Secure
    Java has built-in security features to protect data and code.

  5. Robust
    Java handles errors using exception handling and memory management.

  6. Multithreaded
    Java can do many tasks at the same time (like downloading and playing music).

  7. High Performance
    Java uses Just-In-Time (JIT) compiler for fast execution.

  8. Portable
    Java code can run on different machines without changes.


Java Architecture (Step by Step):

Java follows this flow:

  1. Java Source Code (.java)
    You write your code in a .java file.

  2. Java Compiler (javac)
    It converts .java file to bytecode (.class file).

  3. Bytecode
    This is a special code that is not machine-specific.

  4. Java Virtual Machine (JVM)
    JVM runs the bytecode on any system and converts it into machine code.


Simple Diagram:

.java file → (javac) → .class file → (JVM) → Machine Code
Enter fullscreen mode Exit fullscreen mode

Example:

public class MyJava {
    public static void main(String[] args) {
        System.out.println("Java is simple!");
    }
}
Enter fullscreen mode Exit fullscreen mode
  • Compile: javac MyJava.java
  • Run: java MyJava
  • Output: Java is simple!

Top comments (0)