Sun/Oracle says the reason is combo of:
- Need: compile time type checking is sufficient
- Code size: avoid STL-like code bloat
- Performance: avoid type checking at runtime that was already done at compile
Type erasure ensures that no new classes are created for parameterized
types; consequently, generics incur no runtime overhead.
In short, 1-5 are reifiable because they simply remain the same types as specified in the code so there is no type information lost/erased, but 6-8 will lose type information during compilation (the stuff between the <>) so can’t be accessed at runtime.