what is the difference between
<T> void foo(List<T> i) {
.........
}
and
void foo(List<?> i) {
........
}
Both allows only methods of object invoke on i (compiler restriction). Second method with wild card won't let you add any object into the list (we can make it work with a helper method, which is headache). Why do we need unbounded wild card? It is not restricting or relaxing any types to be invoked with. When do we use second approach over first?