A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Node.js in Action
this week in the
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?
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: can i add any type of collection to Collection<Instrument>
Generics for Interface
Regarding Generics !
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014