I was looking at the stream interface and found this method :
<R> Stream<R> map(Function<? super T, ? extends R> mapper);
I can't find any reason why "? extends R" instead of R :
<R> Stream<R> map(Function<? super T, R> mapper);
so what will be the difference if I make it like above ? isn't the "?" is the R variable that I pass ? and it will extend R I can't find a reason for it.