Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

collections  RSS feed

 
Santosh Kumar Nayak
Ranch Hand
Posts: 153
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
Sheriff
Posts: 15865
81
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: 3211
78
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!