jQuery in Action, 2nd edition*
The moose likes Java in General and the fly likes Collections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Collections" Watch "Collections" New topic
Author

Collections

naro pad
Ranch Hand

Joined: May 07, 2008
Posts: 58

Hi,

I had a question about collections. We have Set, List, Map which are interfaces and HashSet, ArrayList, HashMap,... which are the classes that are implement this interfaces.
What about the Collection? I had the impression that was an interface but I found it to be a class. What is a class or interface?

Thanks
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

naro pad wrote:What about the Collection? I had the impression that was an interface but I found it to be a class.

Collection is an interface.

What is a class of interface?

Can you rephrase this ?


[My Blog]
All roads lead to JavaRanch
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38076
    
  22
Collection or Collections? Both exist.
Pramod P Deore
Ranch Hand

Joined: Jul 15, 2008
Posts: 629

Collections is a class
Collection is an interface


Life is easy because we write the source code.....
naro pad
Ranch Hand

Joined: May 07, 2008
Posts: 58

Ok now I understand, I didn't know that both exist. I was missing the (s) at the end of the Collection that's why I was confused.

Thank you guys
 
Don't get me started about those stupid light bulbs.
 
subject: Collections
 
Similar Threads
do reply me --- collection
collections doubt
Collections: exam requirments - First 2 Qs, anyone?
sorting of a list having bean object
a question about Collection framework?