Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generics Whizlabs

 
Saibabaa Pragada
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is Whizlabs questions. Could you please advice on the following comments ?
 
Joe carco
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is it you want to know? what exactly is your question??
 
Prasad Kharkar
Ranch Hand
Posts: 446
1
Eclipse IDE MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Saibabaa Pragada wrote:

above method argument means that we can pass any list that extends String but we cannot add elements to it

Saibabaa Pragada wrote:

and above method means that we can pass list of anything that is super type of String and we can ADD either String
or subype of String
(subtype of String is not possible as it is final class)

this may be a little difficult to understand so consider following example



hope this helps

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic