Please enable JavaScript.
Coggle requires JavaScript to display documents.
Generics (Type limit (<?> (public <T> int aMethod(<T>…
Generics
-
-
-
-
ContraVariant
-
because container generic type limits most general type it can accept,
adding a more general type can break the constraint.
generic method
public <T> T aMethod(T[] arr, T elem)