Before Java 5, a general container held Object references—meaning you could accidentally drop a String into a list of Integers and discover the bug only when a downcast crashed at runtime. Generics let javac enforce the element type statically without losing reusability.
More lessons in Complete Core Java