A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Arduino in Action
this week in the
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
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?
I agree. Here's the link:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
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-2013