Generics: are a facility of generic programming that was added to the Java programming language in 2004 as part of J2SE 5.0. They allow "a type or method to operate on objects of various types while providing compile-time type safety."[1] A common use of this feature is when using a Java Collection that can hold objects of any type, to specify the specific type of object stored in it.