Chapter 1 — Introduction to Java & JVM

📚 Chapter Overview

This chapter introduces the world of Java, exploring its "Write Once, Run Anywhere" philosophy, the essential architecture of the JVM, and setting up your first professional development environment.

Learning Objectives:

1.1 What is Java & Its Features

Part 1 — Definition

Java is a high-level, class-based, object-oriented programming language designed to have as few implementation dependencies as possible. Developed by James Gosling in 1995, it is famous for its platform independence, robustness, and security. Java code is compiled into "Bytecode," which can run on any device equipped with a Java Virtual Machine (JVM).

Part 2 — Syntax

Main.java
public class Main {
    public static void main(String[] args) {
        // Your code here
    }
}

Part 3 — Example

Problem: Print a welcome message to the console.

Welcome.java
public class Welcome {
    public static void main(String[] args) {
        System.out.println("Welcome to Intelle Learn Java Mastery!");
    }
}

Output: Welcome to Intelle Learn Java Mastery!

Part 4 — Video

Video: Coming Soon

Video Link: [Add YouTube Video Link Here]


1.2 The JVM Architecture (JDK vs JRE vs JVM)

Part 1 — Definition

Understanding the Java ecosystem is crucial. JVM is the engine that runs bytecode. JRE is the environment that includes the JVM and libraries needed to run apps. JDK is the full developer kit that includes the JRE plus tools like the compiler (javac).

Part 2 — Commands

Terminal
javac MyFile.java  // Compiles source to bytecode (.class)
java MyFile       // Executes the bytecode via JVM

Part 3 — Example

To verify your installation, you can run the following command in your terminal:

Terminal
java -version

Expected Result: It should display the installed Java version (e.g., java 17.0.x).

Part 4 — Video

Video: Coming Soon

Video Link: [Add YouTube Video Link Here]


🏆 Chapter Challenge

Challenge Objective

Verify your development environment by creating a class that displays your professional developer profile.

Requirements

Step-by-Step Process

  1. Install JDK 17+ on your machine.
  2. Open a text editor and write the class structure.
  3. Compile the file using javac in the terminal.
  4. Run the resulting .class file using java.

Expected Deliverables

Solve in Compiler