Core Java Introduction, JDK, JVM, and JRE
Understand what Java is, why it is popular, and how the JDK, JVM, and JRE work together.
Inside this chapter
- What Java Is
- JDK, JRE, and JVM
- How Java Code Gets Executed
- Your First Java Program
- Why Core Java Matters
Series navigation
Study the chapters in order for the most natural learning path. Use the navigation at the bottom of each page to move chapter by chapter.
What Java Is
Java is a high-level, object-oriented programming language known for portability, reliability, and strong ecosystem support. It is widely used in enterprise applications, backend systems, Android development, financial systems, web services, and large-scale business software.
The famous idea associated with Java is Write Once, Run Anywhere. That means a compiled Java program can run on any system that has the Java Virtual Machine, or JVM.
- Object-oriented and class-based
- Strongly typed
- Platform-independent through the JVM
- Rich standard library and enterprise usage
JDK, JRE, and JVM
| Term | Meaning | Purpose |
|---|---|---|
| JDK | Java Development Kit | Used for developing Java applications |
| JRE | Java Runtime Environment | Used for running Java applications |
| JVM | Java Virtual Machine | Executes Java bytecode |
The JDK contains tools like the compiler. The JRE contains the libraries and runtime support needed to run programs. The JVM is the engine that executes Java bytecode.
How Java Code Gets Executed
javac Hello.java
java Hello Your First Java Program
public class Hello {
public static void main(String[] args) {
System.out.println("Hello, Java!");
}
}
This introduces a few essential ideas: a class, the `main` method as program entry point, and `System.out.println` for output.
Why Core Java Matters
Before learning frameworks like Spring or advanced backend development, a student should understand Core Java well. Collections, OOP, exceptions, multithreading, memory behavior, and APIs all depend on Core Java fundamentals.