File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why Generics and not 'Specifics'

 
Dave Brown
Ranch Hand
Posts: 301
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably missing something really obvious here but with the introduction of Generics the compiler can see a collection is intended to hold a Specific object.. not a Generic object..

List<String> is 'Specific'ally a list of Strings.. but List on its own is a generic list... can hold any object....

It seems backwards to me, but as I said I'm sure I'm missing something obivous !!
 
Mike Simmons
Ranch Hand
Posts: 3028
10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I talked about this a bit just the other day in my third post here.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic