bounding java generics by 'super' keyword

Posted by mohsenof on Stack Overflow See other posts from Stack Overflow or by mohsenof
Published on 2010-05-10T04:48:54Z Indexed on 2010/05/10 5:08 UTC
Read the original article Hit count: 334

Filed under:
|
|

Why I can use 'super' just with wildcards and not with type parameters?

for example why in Collection interface they've not written toArray method like this

interface Collection"<"T>{ public "< S super T> S[] toArray(S[] a){ } }

(sorry, I don't know how to deal with "<")

© Stack Overflow or respective owner

Related posts about java

Related posts about generics