Are Java Generics a Hack?
A look at how Java generics actually work under the JVM hood: type erasure, bridge methods, reflective workarounds, and the design trade-offs that shaped them.
Posts in this series
- 01.
The JVM Has Never Heard of Your List<String>
You write List<String>. The compiler checks it, enforces it, then erases it. By the time bytecode runs, the JVM sees List — nothing more. Here's what that means.