Note: This lesson covers a language feature introduced in the
latest release of the
JavaTM 2 Platform Standard Edition version 5.0.
Visit the
J2SE 5.0 download page.
Introduced in J2SE 5.0, this long-awaited enhancement to the type system
allows a type or method to operate on objects of various types while providing
compile-time type safety. It adds compile-time type safety to the Collections
Framework and eliminates the drudgery of casting.
Your use of this page and all the material on pages under "The Java Tutorials" banner,
and all the material on pages under "The Java Tutorials" banner is subject to the Java SE Tutorial Copyright
and License.
Additionally, any example code contained in any of these Java
Tutorials pages is licensed under the
Code
Sample License.