This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Collection, Collections and Collections Framework? 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 » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Collection, Collections and Collections Framework?" Watch "Collection, Collections and Collections Framework?" New topic
Author

Collection, Collections and Collections Framework?

Pankaja Shinde
Ranch Hand

Joined: Sep 15, 2006
Posts: 87
What is the difference between Collection, Collections and Collections Framework?

What is the role of Maps in them?

Pankaj Shinde
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41149
    
  45
The Sun Java Tutorial has a section on Collections which should answer your questions.


Ping & DNS - my free Android networking tools app
Tommaso Nuccio
Ranch Hand

Joined: Dec 11, 2006
Posts: 66
Quick overview

"Collection" is an interface where the interfaces Set, List and Queue extend from. These in turn are implemented by the different classes, e.g. the interface Set by HashSet.

"Collections" is a class that holds all kind of static methods. For example Collections.sort(List<T> list) that will sort a list or its overload Collections.sort(List<T> list, Comparator<? super T> c).

"Map"s are also a collection and thus part of the Collection Framework, but "Map" simply does not extend from "Collection".

The Collection Framework is a help for the programmer to make use of well defined, loose coupled and high cohesive classes and interfaces that have been tested to be "perfect".

This should give you a first overview.
Good luck.


Ciao,<br /> Tommaso<br /> <br />~*~*~*~<br />There are 10 types of people, those who understand binary and those who don't.
 
wood burning stoves
 
subject: Collection, Collections and Collections Framework?
 
Similar Threads
Collection, Collections, Java Collections Framework
Collections
How to remove common item between 2 ArrayList
diffrence between collection n collections
a question about Collection framework?