What is the meaning of the >
token in this code copied from www.JavaPractices.com? When I replace it with the more conventional looking
This is an example of using wildcard in a type argument. i.e. a generic type.
A wildcard parameterized type is an instantiation of a generic type where at least one type argument is a wildcard. Examples of wildcard parameterized types are Collection>
, List extends Number>
, Comparator super String>
and Pair
.
A wildcard parameterized type denotes a family of types comprising concrete instantiations of a generic type. The kind of the wildcard being used determines which concrete parameterized types belong to the family.