Loading...
Loading...
Section 04 · Stage 1: Learn Java
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.
Write type-safe, reusable Java code with generic classes and methods, bounded types and wildcards, and understand the limits that type erasure brings.
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.
Store, loop through, search, sort and share ordered data with ArrayList, LinkedList and unmodifiable lists, and understand the cost of each operation.
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.
Store unique values with HashSet, LinkedHashSet and TreeSet, make your own classes work in sets, and combine sets with union, intersection and difference.
Store, look up, count and group data by key with HashMap, LinkedHashMap and TreeMap, and understand how HashMap works inside.
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).
Brings the section together: the Collections and Arrays helpers, the equals/hashCode rules every collection depends on, choosing by performance, and interview-level review.
Five console projects that put lists, sets, maps, queues and sorting to work, ending with a library system built entirely on collections.