Stage 1 · Lesson 3 of 10
Collections and generics
are the built-in that hold your data. The main ones are List (usually ArrayList), Map (usually HashMap), Set (usually HashSet), and Deque (usually ArrayDeque) for stacks and queues. such as List<Order> and Map<String, User> tell the compiler what goes in, so it can check what comes out.
Learn the streams API for transforming collections. filter, map, collect and Collectors.groupingBy cover most backend data work. List.of and Map.of create collections that cannot be changed.
Common trapoverriding equals without hashCode, or changing a field of an object while it sits in a HashMap or HashSet. Lookups then quietly fail, because the object is filed under a that no longer matches. , next, generate both methods for you.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- GuideFreeDev.java: Learn Java
Oracle · Beginner
The official path through modern Java: records, collections, generics and exceptions
- CourseFreeJava Programming MOOC
University of Helsinki · Beginner
Free Helsinki course with hundreds of graded exercises, the best way to get fluent
Practise
Keep handy
Also worth your time
The DNS, TCP, TLS and HTTP steps behind every request your backend will handle