Say, I have a method:
public static Collection addToCollection(T element, Collection collection) {
collection.add(element);
The type inference system has been improved in Java 8, with the introduction of target typing, in order to give more expressivity to streams and lambdas. As a consequence your code compiles with Java 8.
More about it in the updated tutorial, with a very similar example towards the very bottom of the page.