Because of code conventions. Check out @deduper's answer for a great explanation.
Is there any actual difference?
When writing your code normally, your compiler will infer the correct T for things like Supplier and Function, T>, so there is no practical reason to write Supplier extends T> or Function, ? extends T> when developing an API.
As you can see, strict() works okay without explicit declaration because T is being inferred as Integer to match local variable's generic type.
Then it breaks when we try to pass Supplier as Supplier because Integer and Numberare not compatible.
And then it works with fluent() because ? extends Number and Integerare compatible.
In practice that can happen only if you have multiple generic types, need to explicitly specify one of them and get the other one incorrectly (Supplier one), for example:
void test() {
Supplier supplier = () -> 0;
// If one wants to specify T, then they are forced to specify U as well:
System.out.println(this., Number> supplier);
// And if U happens to be incorrent, then the code won't compile.
}
T method(Supplier supplier);
Example with Comparator (original answer)
Consider the following Comparator.comparing method signature:
public static > Comparator comparing(
Function super T, U> keyExtractor
)