Section 04 · Stage 1: Learn Java
Java Collections
Generics and the Collections Framework: lists, sets, maps, queues and sorting, how they work inside, and how to choose the right one, with GitHub-ready projects.
What you will learn
4.1Generics7 lessons
Write type-safe, reusable Java code with generic classes and methods, bounded types and wildcards, and understand the limits that type erasure brings.
4.2The Collections Framework4 lessons
Why collections replace arrays for changing data, how the Collection and Map family tree fits together, and how to pick the right collection for a job.
4.3Lists10 lessons
Store, loop through, search, sort and share ordered data with ArrayList, LinkedList and unmodifiable lists, and understand the cost of each operation.
- ArrayList: add, get, set, remove35 min
- Looping through a list35 min
- Iterator and safe removal35 min
- Search and sort a list35 min
- Lists of your own objects40 min
- How ArrayList works inside35 min
- LinkedList and when to use it35 min
- Fixed and unmodifiable lists35 min
- Common mistakes and practice40 min
- Must-do problems: Lists140 min
4.4Sorting & Comparing4 lessons
Give your own classes a natural order with Comparable, sort any data in any order with Comparator, and avoid the bugs that make sorts silently wrong.
4.5Sets6 lessons
Store unique values with HashSet, LinkedHashSet and TreeSet, make your own classes work in sets, and combine sets with union, intersection and difference.
4.6Maps11 lessons
Store, look up, count and group data by key with HashMap, LinkedHashMap and TreeMap, and understand how HashMap works inside.
- HashMap: keys and values35 min
- Looping through a map35 min
- Counting and grouping with maps40 min
- Modern Map methods: getOrDefault, merge, computeIfAbsent40 min
- How HashMap works inside40 min
- LinkedHashMap and TreeMap40 min
- Build an LRU cache with LinkedHashMap45 min
- EnumMap and EnumSet40 min
- Maps with your own objects40 min
- Common mistakes and practice45 min
- Must-do problems: Maps180 min
4.7Queues, Stacks & Priority Queues6 lessons
Handle waiting work in the right order with queues (first in, first out), stacks (last in, first out), deques (both ends) and priority queues (most important first).
4.8Utilities & Best Practices6 lessons
Brings the section together: the Collections and Arrays helpers, the equals/hashCode rules every collection depends on, choosing by performance, and interview-level review.
4.9Collections Mini Projects5 lessons
Five console projects that put lists, sets, maps, queues and sorting to work, ending with a library system built entirely on collections.
