aspose file tools*
The moose likes Cattle Drive and the fly likes Why Generics and not 'Specifics' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Why Generics and not Watch "Why Generics and not New topic
Author

Why Generics and not 'Specifics'

Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
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 !!

Regards, Dave Brown
SCJP 6 - [url]http://www.dbws.net/[/url] - Check out Grails Forum
Mike Simmons
Ranch Hand

Joined: Mar 05, 2008
Posts: 3014
    
  10
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
 
subject: Why Generics and not 'Specifics'