• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

collections

 
Santosh Kumar Nayak
Ranch Hand
Posts: 143
Eclipse IDE IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the meaning of the Collection<? extends String> my_plan

Can some one explain me the above syntax.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15441
41
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's generics with wildcards. See this tutorial: Generics - Wildcards.
 
Tony Docherty
Bartender
Posts: 2971
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That use of an upper bounded wildcard is actually pointless as the String class is final and so there are no subclasses of String.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic