Java / Generics
Generics.
Generics introduced in Java 1.5, facilitates strong-typing on the collection objects. Generics defines the object types that the collection can hold.
It provides compile time type-safety and ensures that only the particular type is added in collection and eliminates ClassCastException in runtime.
More Related questions...