← Java Programming learning pathJava Programming · Module 1 of 10
Java basics
Java is an object-oriented language that runs anywhere a JVM is installed.
📖 Key ideas
- Java code is compiled to bytecode (.class) and run by the Java Virtual Machine (JVM).
- "Write once, run anywhere": the same bytecode runs on Windows, Linux and macOS.
- A program starts at public static void main(String[] args).
- System.out.println("Hi"); prints a line.
- JDK = tools to build; JRE/JVM = runtime to run.
💡 Real-life example: The JVM is like a universal plug adapter: the same Java program plugs into any operating system.
JVMRuns Java bytecode
JDKKit with the compiler and tools
BytecodeCompiled .class instructions
mainEntry point of a Java program