← Back to subjectsStart lesson →Start lesson →Start lesson →Start lesson →Start lesson →Start lesson →Start lesson →
Intermediate
Module 12: Generics and Type Safety
Parameterize types for reusable, type-safe APIs across collections and custom data structures.
7 lessonsGuided quizzesProjects & habits
01Duration · 12 minLocked
Why Generics?
See how generics eliminate casts and runtime ClassCastException problems.
02Duration · 16 minLocked
Generic Classes & Interfaces
Define type parameters on classes to reuse logic for multiple data types.
03Duration · 15 minLocked
Generic Methods
Parameterize individual methods even inside non-generic classes.
04Duration · 18 minLocked
Bounded Type Parameters
Use upper and lower bounds to restrict acceptable types.
05Duration · 16 minLocked
Wildcards & Variance
Express flexible APIs with wildcard types.
06Duration · 14 minLocked
Type Erasure & Limitations
Understand how the JVM implements generics and why some operations are forbidden.
07Duration · 30 minLocked
Mini-Project: Generic Data Structure
Implement a generic cache or queue with bounded type parameters and Optional results.