If you want to make a class use generics, add
<T> after the class name
and before the constructor (if there is one). You can then use
T as a placeholder
for the generic type, such as in constructor parameters.
Here, we have a
Transport that can only transport objects of type
critterCarrier is passed a
Frog, it will be a
can only transport frogs.