This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 2982
    
    9
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'
 
Similar Threads
Generics
generics
Generics
generics
generics