File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
Java in General
can i add any type of collection to Collection<Instrument>
Joined: Jan 08, 2010
May 27, 2010 09:29:32
i have a collection named
can i add any type of collection x?
any type mean List,Set ,Queue or Map?
Joined: Apr 10, 2010
May 27, 2010 09:45:19
Be careful: Map is not a subinterface of Collection
You can build an instance of all the classes implementing subinterfaces of Collection (Set,List,Queue...)
Joined: Sep 29, 2008
May 27, 2010 12:37:58
What happened when you tried? What did you discover in the API documentation?
Don't get me started about those stupid
subject: can i add any type of collection to Collection<Instrument>
Regarding Generics !
Generics for Interface
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014