• Post Reply Bookmark Topic Watch Topic
  • New Topic

Genrics  RSS feed

 
Vicky Singh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi wats the use of wild cards < ?extends >, < ? super> in genrics....
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are used when you to need to allow a certain group of classes that are bounded above or below.

That is if you use ? super String, then that will match String or Object.
 
Vicky Singh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ThankXX a LOT....
 
Vicky Singh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I get More Detailed Info some where on net with some detailed examples...
 
Campbell Ritchie
Marshal
Posts: 56227
171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, Vicky.

Search through these fora for similar questions: try the three Java in General fora first.
In all these sorts of questions, one of the first places to look should always be the Java tutorial; it has a section about generics including the ? operator here.

CR
 
Naseem Khan
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may refer following these two materials

1. Generics in the Java Programming Language


2.wildcard in generics


Naseem
 
Vicky Singh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thankx Campbell & Naseem ....

The genrics were making my life Hell in recent past but I think NOW I can manage them.... This place is COOOOOL....

PS: Naseem ur links were real help Thanks Again.......
 
Campbell Ritchie
Marshal
Posts: 56227
171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only too pleased to be able to help
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!