As per my understanding, the difference is in the method signature.
In first method, the arguments are: (Set<T> s, T t)
In second method, the arguments are: (Set<T> s)
When you call the first method passing a wildcard, the second argument is the actual cause of error since its not sure between the Types passed in the 2 arguments.
addToSet(unknownSet, “abc”);
First argument Set<?> is of some unknown type, but the second argument is of Type
String.
When you call the second method, you only have to deal with Set<T>, which can handle the wildcard ? Type easily.