The "animals" parameter, is a list of some unknown type that could either be a Dog, Animal, or Object. This doesn't mean that the list can hold Dog, Animal, or Object instance -- it just means that
Java doesn't know what it is... But is still require to type check it, and not allow invalid types for the list.
So, since Java doesn't know what it is, and must type check it... it has two options. One, it can allow only objects that IS-A Dog, IS-A Animal, and IS-A Object (all the possible types at the
same time). Or Two, it can reject the operation. At "this line", it took the second option, at the line before "this line", it took the first option.
Henry