Consider an example when arraylists are not parameterized
ArrayList listOfObjects = new ArrayList();
listOfObjects.add("someStringValue");
listOfObjects.add(new Integer(10));
listOfObjects.add(new Dog());
Everything is valid here so you can add anything in the listOfObjects.
But if you parameterize it,
ArrayList<String> listOfStrings = new ArrayList<String>();
listOfStrings.add("someStringValue");
listOfStrings.add(new Dog()); // Boom, compiler error, can't add dogs into list of strings
Compilation is successful because the generic code needs to be compatible with the legacy code in which generics are not used.
Also there is no type safety at runtime,