• Post Reply Bookmark Topic Watch Topic
  • New Topic

Generics in Java  RSS feed

 
Santosh Kumar Nayak
Ranch Hand
Posts: 193
Eclipse IDE IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

List<Number> and List<? extends Number>?

List<Number> --> List of Numbers (or instances of Number) : Will it only take Number as argument ?

List<? extends Number> --> List any type which extends Number  : Will it only take subclass of Number class ?

 
Campbell Ritchie
Marshal
Posts: 56553
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somebody else asked a similar question a few weeks ago: here.

I don't think this is the best place for this question: let't move you to the same forum as the older thread.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!