Upper/lower bound for a wildcard : Bounded Types « Generics « Java Tutorial






Establishing an upper bound for a wildcard

<? extends superclass>

Specifying a lower bound for a wildcard

<? super subclass>

Here is the syntax for a generic method:

<type-param-list> return-type meth-name(param-list)








12.5.Bounded Types
12.5.1.Bounded Types
12.5.2.Using Wildcard Arguments
12.5.3.Bounded Wildcards
12.5.4.Upper/lower bound for a wildcard