Wildcards can be very confusing when it comes to generics in the Java language, and one of the most common mistakes is to fail to use one of the two forms of bounded wildcards (“? super T” and “? extends T”) when needed. You’ve made this mistake? Don’t feel bad, even the experts have, and this month Brian Goetz shows you how to avoid it.
just don’t go to wild :
* List<int> primitive;
* List<Integer> array[];
* if (T instanceof String) {}
* function(List<Integer>.class);
and i have a lot of other trouble because of the type erasure. so kids, just say no and wait for the proper implementation. java generics are nothing but a fancy way to remove the casting.