Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Question about super and extends

User_HKVSQJan 10 2021

Hi there,
Why does Java stream looks like this:
stream.map(Function<? super T,? extends R> mapper)
Why does it use the super and extends keywords?
I mean, why is it not defined like this?
stream.map(Function<T, R> mapper)
Regards,
Henk

Comments
Post Details
Added on Jan 10 2021
0 comments
148 views