This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 41592
    
  55
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Collection, Collections and Collections Framework?