Used for questions that address generics in Java and other languages. Generics are often used to restrict collections to a single contained type so that the system can guarantee correctness in some cases.

Generics allows classes, methods, and interfaces to have one or more class types as parameters. Generics are commonly used in Java and are somewhat analogous to templates in C++. Read more: