not specific to Java, many languages have generics. Java, C++, C#, Rust.
For example in C#, a List<T> is a dynamically resizable collection of items of type T. A List<string> contains only strings, a List<MyObnoxiouslyNamedClass> contains only instances of MyObnoxiouslyNamedClass etc.