Lesson 33 of 34 · Collections & Exceptions
Quiz: Java Collections, Exceptions and Streams
Chapter 6 gave you the tools professional Java code uses every day: HashMap for key-value lookups and counting, sets for uniqueness and fast membership checks, exceptions with try/catch/finally and your own exception types, and lambdas with streams for short, declarative data processing. Check that the key ideas stuck before you face the final boss of the Bytecode Highlands.
What this quiz covers
The questions check what you learned in the Collections & Exceptions chapter of Learn Java. Not sure about a topic? Review its lesson first:
- Java HashMap: Key-Value Pairs
Learn the Java HashMap: put, get, getOrDefault, containsKey, looping over entries, counting with merge and grouping with computeIfAbsent.
- Java HashSet and the Set Interface
Learn Java sets: HashSet, TreeSet and LinkedHashSet, fast contains checks, removing duplicates, and union, intersection and difference.
- Java Exceptions: try, catch, finally and Custom Exceptions
Handle errors in Java with try, catch and finally, understand checked vs unchecked exceptions, use throw and throws, and write your own custom exceptions.
- Java Lambdas and Streams Basics
Write modern Java with lambdas, method references and functional interfaces, then filter, map, sort and sum collections with the Stream API.
Keep learning
Need a quick reminder? The Java cheat sheet has every topic of Learn Java on one page.
Lesson last updated on .