Operations on Type Parameters
Let’s ask ourselves a quick question: Given a type parameter
T, what kind of operations can we carry out over it? Because the type parameter
T can be substituted for anything, our generic code can’t deal with specifics of a certain type. Nevertheless, a few basic operations can be meaningfully defined.