So I was looking at the
Java 8 features.
While I was looking at the examples of Function and BiFunction usage in ConcurrentHashMap, I came across below two methods:
And:
Why is Generics used the way it is used?
Somewhere we have "? super" and somewhere we have "? extends". On what basis these parameters are decided?
Why can't all be "? super", or all be "? extends"?
And to add to this, I do understand how generics work and why we have "? super" or "? extends". But just curious to know why is it implemented that ways?