Example for Introduction to Generics in Java
While uniform collections are the obvious example, you can also build or use a Pair class in which the types of the two components are given by generic arguments. If you don't want to build it, there is a built-in class with this property: $Pair&lt;K,V&gt;$

But building one like it is simple enough if that is your goal. 

Once you have your desired class, Write a function/method that needs to return two things instead of one. Bundle them up in a Pair.