Posted On: Feb 22, 2018
Generics Collection is to enforce the type-safety of the objects. Without using generics, we can store any type of object in the collection. But generic enforces the collection to store a specific type of collection. It ensures the type-safety of the objects thus reducing bugs at the compile time. Generics also removes the need to typecast an object.
Never Miss an Articles from us.