← Learn
Learn · Java

Advanced Java

Nine lessons on the Java that professional code is made of: lambdas and functional interfaces, streams and Optional, how ArrayList, HashMap and the other collections work inside, files and try-with-resources, threads, executors, CompletableFuture and virtual threads, the stack, the heap and garbage collection, modern Java’s records, sealed types and pattern matching, real projects with Maven, Gradle, tests and logging, and design patterns.

Part of the Java developer path.

Take first: Intermediate Java.

More info

How it works

Each lesson is a short read with Java examples and what each one prints. Then practice questions: say what a snippet prints (Java’s output exactly, capitals and all), pick an answer, tap lines of code or steps into order, or tap the line of an error message that gives the cause away. You can try again as often as you like; after two misses there’s a button to show the answer. To run an example yourself, save it as Main.java (adding the public class Main and main lines around it if it doesn’t have them, and import java.util.*; at the top for lists, maps and the other collections) and run java Main.java.

What do I need to know first?

Intermediate Java, or the same ground elsewhere: classes and interfaces, lists and maps, exceptions, records and generics. Every example that shows what it prints was compiled and run on Java 21 (the newest features are marked with the version that added them).

Related courses

Where is my progress saved? In this browser, like the rest of the site. Nothing to sign up for.

Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates. This course isn’t made by or affiliated with Oracle. Library and tool names (Maven, Gradle, JUnit, Mockito, SLF4J, Logback, Log4j, Spring Boot) are used only to say what they are. Every shop, service, file and person in the examples is made up.