• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Generics in Java  RSS feed

 
Ranch Hand
Posts: 227
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 ?

 
Marshal
Posts: 60065
188
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!