Glossary: Java Beyond the Basics
Generic class
Also written: generic method, generics, type parameter, generic record
A class, record or method written once with a type parameter (a placeholder such as T) so it works for many types, like Counter<T>. Generics catch wrong types at compile time.