Java · Learn

The Java curriculum

A statically typed, object-oriented language with a mature ecosystem. Common in large backends, Android apps and enterprise systems. This path has 13 lessons in reading order, from the basics to the ideas that come up in real code, with a runnable example in every lesson.

lessons
8 lessons
hours of reading
1.2 hours of reading
exercises to practise
0 exercises to practise

Beginner

8 lessons · about 70 minutes of reading, plus practice.

  1. Java Syntax and Your First ProgramWhat every Java program needs: a class, a main method, statements and semicolons. Compile and run a first program, read input, and avoid the usual setup errors.8 min
  2. Variables and Data Types in JavaJava's primitive types and String, declaring and initialising variables, var, casting and integer overflow: why the type you pick decides what a value can hold.9 min
  3. Operators in JavaJava's arithmetic, comparison, logical and assignment operators: integer division, remainder, short-circuit evaluation and precedence, with runnable examples.9 min
  4. Conditions in Java: if, else and switchHow Java chooses between paths with if, else if and else, how the switch with arrows works, how to compare strings correctly and how to keep branches readable.9 min
  5. Loops in Java: for, while and do-whileHow Java repeats work with for, while and do-while loops, when each fits, what break and continue do, and how to avoid off-by-one and infinite loops.9 min
  6. Arrays in JavaHow Java arrays store a fixed number of values of one type: creating and indexing them, length, the for-each loop, java.util.Arrays helpers and 2D arrays.9 min
  7. Strings in JavaHow Java strings work: immutability, the methods you use daily, why equals not == compares text, trimming and splitting input, StringBuilder and String.format.10 min
  8. Methods in JavaHow to define and call Java methods: parameters and arguments, return types and void, overloading, variable scope, and why arguments are passed by value.9 min