Core Java Tutorial

Java is a general-purpose, object-oriented programming language used to build everything from Android apps to large enterprise backends. It's known for one big promise: "Write Once, Run Anywhere." Java code compiles to bytecode, which can run on any device with a Java Virtual Machine — Windows, Mac, Linux, or Android — without changes.

Tip: This track covers Core Java from the ground up. Once you're comfortable here, the Spring and Hibernate tracks (coming soon) build directly on these fundamentals.

JDK, JRE, and JVM — What's the Difference?

TermWhat it isWho needs it
JVMJava Virtual Machine — runs compiled Java bytecode on any operating system.Every Java program, at runtime
JREJava Runtime Environment — the JVM plus core libraries needed to run Java programs.Anyone who just wants to run Java apps
JDKJava Development Kit — the JRE plus a compiler and tools needed to write and build Java programs.Developers (you!)

How Java Code Runs

[YourFile.java] --compile (javac)--> [YourFile.class bytecode] --run (JVM)--> [Program Output]
          

You write human-readable code in a .java file. The javac compiler turns it into platform-independent .class bytecode. The JVM on any machine then executes that bytecode — this is what makes Java portable.

Your First Java Program

Example: Hello World

public class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello, World!");
  }
}

Breaking it down:

  • public class HelloWorld — every Java program lives inside a class; the filename must match the class name (HelloWorld.java).
  • public static void main(String[] args) — the entry point. This is always where execution starts.
  • System.out.println(...) — prints text to the console, followed by a new line.
Note: Java is case-sensitive and every statement ends with a semicolon ;. We'll cover syntax rules in depth on the next page.

Why Learn Core Java First?

ReasonWhat it means for you
Strong OOP foundationClasses, objects, inheritance — concepts every modern language borrows from
Huge ecosystemAndroid, Spring, Hibernate, and countless enterprise systems run on Java
Statically typedMany mistakes are caught at compile time, before your code ever runs
In-demand skillConsistently one of the most requested languages in backend job postings
Next steps: Head to Installation & Setup to get the JDK installed and your first program running on your own machine.