Learn modern Java 25, from your first println to records, interfaces, generics and a small final project, with every exercise checked as you go.
15 lessons, 30 exercises. Runs Java OpenJDK 25.
Not started
Hello, output
Print text with System.out, add comments, and see how a Java program is compiled and run.
Values and variables
Store values in typed variables, pick the right type, and use final for constants.
Reading input and arithmetic
Read lines from standard input with BufferedReader, turn text into numbers, and do arithmetic.
Making decisions
Choose what your program does with if/else, comparisons, boolean operators and switch.
Loops
Repeat work with for, while and do-while loops, and leave a loop early with break and continue.
Methods
Split a program into named methods with parameters and return values, and understand where variables live.
Collections
Store many values in arrays, ArrayLists and HashMaps, and loop over them.
Strings and a small project
Slice, search and build text with String and StringBuilder, then combine everything so far in a receipt printer.
Handling errors
Catch exceptions with try/catch/finally, throw your own, and understand checked versus unchecked exceptions.
Classes and records
Model your own data with classes (state plus behaviour) and records (compact, immutable data carriers).
Recursion
Solve problems by having a method call itself on a smaller version of the same problem.
Sorting and searching
Sort arrays and lists with custom Comparators, and find values fast with binary search.
Maps and sets in depth
Count and group with Map.merge and computeIfAbsent, choose the right map or set, and combine sets with union, intersection and difference.
Interfaces and generics
Describe what types can do with interfaces, use sealed interfaces with pattern matching, and write reusable code with generics.
Final project: inventory and gradebook
Combine classes, collections, exceptions, sorting and string formatting into two small but complete programs.
Your progress is saved in this browser. Sign in to keep it on every device.