Browse Oracle Certification Guides

1Z0-830 Java 21 Type Parameters, Bounds, Wildcards and Erasure Guide

Study 1Z0-830 Java 21 Type Parameters, Bounds, Wildcards and Erasure: key concepts, common traps, and exam decision cues.

Generics feel abstract until you turn them into three questions: what can I read, what can I write, and what survives after compilation?

Generic-choice map

If the stem is mainly about… Better first instinct
source-only reading ? extends T may be the right direction
sink-only writing ? super T may be the right direction
exact container type remember invariance for generic types
runtime type information erasure limits what remains visible

What the exam is really testing

If the code shows… Strong reading
List<Number> vs List<Integer> invariance is likely the real issue
wildcard reads and writes PECS is probably the elimination tool
runtime generic checks erasure limits what Java can know later

Common traps

Trap Better rule
believing List<Integer> is a subtype of List<Number> generic invariance blocks that
using ? extends T as a write-friendly target safe writes are intentionally restricted
assuming all generic facts remain available at runtime erasure changes what can be inspected

Quiz

Loading quiz…
Revised on Sunday, May 10, 2026