Signing you in…

Wildcards in Generics

Wildcards (?) solve the problem that List<Dog> is not a List<Animal>. They let you write methods that work with generic types in a flexible but still type-safe way. There are three kinds: unbounded (?), upper-bounded (? extends T), and lower-bounded (? super T).

Unbounded Wildcard — ?
Content is available with subscription.
Get full access to all courses on the platform for one year with a single payment.
Unlike other platforms that charge per course, here you get everything for one price, and after one year of use there will be no automatic charge for the following year.