Robert

32%
Flag icon
The compiler inserts invisible casts for you and guarantees that they won't fail (assuming, again, that all of your code was compiled with a generics-aware compiler and did not produce or suppress any warnings).
Robert
This glosses over the fact that Generics is only a language construct. That is, the compiled output (bytecode) would be identical for code that had generics and code that doesn't-but-is-otherwise-identical. In other other words, Generics is only a coding & compile-time protection; it has no direct runtime impact.
Effective Java: A Programming Language Guide (Java Series)
Rate this book
Clear rating
Open Preview