Generics in Java | Wildcards | lower bound | upper bound | T extends | ? extends | ? supper

preview_player
Показать описание
Generics in Java

Generics T can be at
class level
interface level
method level

Wildcards ?
lower bound ? extends
upper bound ? supper
unbounded ?

Type parameter - T in class Foo T {} // Declaration
Type argument - String in Foo String obj // Use

====================================================

====================================================

Knowledge Sharing
Knowledge
Sharing
KnowledgeSharing
KnowledgeSharingG

#Knowledge Sharing
#Knowledge
#Sharing
#KnowledgeSharing
#KnowledgeSharingG
Рекомендации по теме
Комментарии
Автор

Really great and depth explanation about Java Generics

gokulkadnar
Автор

Crystal clear explanation. Thank you.

jlee
Автор

this is one of best explanation I have seen, could you please help me understand one thing .. m(List<? super X>) where X is an interface.. how it will work.

Flower_withanshi
Автор

nice explanation! I learned intersection type here . thanks

veerendrashukla