In short, what you say is wrong.
This has nothing to do with "creating read-only collections."
We can still add items to the input list because Collection declared the add(E) method.
The wildcard is straight forward, I think: you really want to limit the type of input, because your logic is only reasonable for a specific type.
For your example, your check may use some Animal method
void check(Collection<? extends Animal> list) {
Without ? extends Animal ? extends Animal The above code will not work, since the incoming list can be a collection of everything (not Animal).
Therefore, we want to make sure that the incoming collection is Collection or Collection, etc., so that our code really makes sense when we extract items from the list and treat the item as Animal.
source share