Chapter 1. Why Generics?
A cat and a dog shouldn't share a bed. Neither should integers and floats.
Thanks for picking up the book! This means you care for Generics. This is similar to dropping a plastic bag in favor of our lonely planet.
We are living in an interesting era, where more and more applications are data driven. To store these different kinds of data, we need several data structures. Although the actual piece of data is different, that doesn't always necessarily mean that the type of data is different. For example, consider the following situations:
Let's say, we have to write an application to pull in tweets and Facebook wall ...