What is Java?
Java is a high-level, object-oriented programming language developed by Sun Microsystems, now owned by Oracle Corporation. It is widely used for developing robust, secure, and platform-independent applications.
Features of Java
- Platform Independent: Java programs can run on any device with a Java Virtual Machine (JVM).
- Object-Oriented: Focuses on objects and classes, supporting OOP principles like encapsulation, inheritance, and polymorphism.
- Secure: Provides features like bytecode verification and runtime environment to ensure security.
- Robust: Exception handling, memory management, and garbage collection ensure stability.
- Multithreaded: Enables concurrent execution of multiple threads for better performance.
- High Performance: Uses Just-In-Time (JIT) compilers to optimize execution speed.
JDK Architecture
JVM (Java Virtual Machine):
JVM stands for Java Virtual Machine. It is an interpreter used to convert bytecode into machine-level languages line by line. JVM is present in JRE (Java Runtime Environment).
What is JRE?
JRE stands for Java Runtime Environment. It consists of JVM and built-in library files that are used to execute Java applications. If we want to only execute Java applications, we need to install JRE. JRE is present in JDK (Java Development Kit).
What is JDK?
JDK stands for Java Development Kit. It is a package provided by the Oracle community that includes tools for both developing and running Java applications. JDK consists of JRE and development tools. Note that JDK is platform-dependent, but software made with JDK is platform-independent.