Notes / Java / Introduction

Introduction to Java — Revision Notes

A quick-reference cheat sheet: definition, syntax, example, common mistakes and an interview tip.

beginner 📖 2 min revision

Definition

📌 Introduction Java was released by Sun Microsystems in 1995 with the promise "write once, run anywhere." Java code compiles to bytecode, which runs on the Java Virtual Machine (JVM) — so the same compiled program runs unchanged on Windows, macOS, or Linux.Java is widely used for Android apps, enterprise backend systems, and large-scale software where reliability matters..

Syntax

syntax
public class ClassName {
    public static void main(String[] args) {
        // your code here
    }
}

Example

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

Output

outputHello, World!

Important Points

Common Mistakes

Interview Tip

🎯 Before your interview "What does JVM stand for and why does it matter?" — Java Virtual Machine; it's what makes Java bytecode portable across operating systems.
Back to notes Read full lesson →