when dealing with wildcards such as setting/adding a generic item to a certain container is it suggested to use something like this?
void add(List<? super T> someList,someitem){
someList.add(someItem);
}
and when retrieving an item it is suggested to use something like this
<T> void f1(List<? extends T> obj, T item) {
obj.add(item);
}
What is the principle behind this? and when will I know if I should use this ?