World 1 of 26 · Beginner

☕ Java Foundations

12 Java concepts, each explained step by step with real code, a common trap and practice questions.

  1. What Java isA compiled, statically typed, object-oriented language that runs on the JVM: write once, run anywhere.
  2. JDK vs JRE vs JVMJDK = tools to build (javac, jshell…), JRE = runtime libraries, JVM = the engine that executes bytecode.
  3. Source → bytecode → JVMjavac compiles .java to .class bytecode; the JVM loads, verifies, interprets and JIT-compiles it.
  4. Anatomy of a programClasses, the main method signature, braces, statements and semicolons.
  5. Printing outputSystem.out.println vs print vs printf, and System.err.
  6. CommentsLine //, block /* */ and Javadoc /** */ comments.
  7. Identifiers & naming conventionsLegal names, case sensitivity, camelCase, PascalCase, UPPER_SNAKE_CASE.
  8. Keywords & reserved wordsReserved keywords, contextual keywords (var, record, yield, sealed) and literals true/false/null.
  9. Compile vs runtime errorsSyntax/type errors caught by javac vs exceptions thrown while running.
  10. Running Javajavac + java, single-file source launch, and the jshell REPL.
  11. Compact source filesJava 25 instance main methods: void main() { ... } without a class declaration for small programs.
  12. Java editions & releasesJava SE, the 6-month release cadence, LTS versions (8, 11, 17, 21, 25) and preview features.