We can use collection classes and objects to handle group of objects (other than arrays). Java has a collection frame work to deal with collections.

Collection framework: A collection framework is a class library to handle group of objects. It is implemented in java.util package.

Collection class: A collection class or container class is a class whose object can store a group of other objects.

Collection object: A collection object is an object that stores a group of other objects. It is also called container class object. The collection object stores objects references.


References of other objects are available in collection objects. All the classes in collection framework have been divided into 3 categories.

1. Set: A group of elements (objects). A class which implements java.util.Set interface is called as a set. Eg: HashSet, LinkedHashSet, TreeSet.

2. Lists: Collection of elements (objects). A class which implements java.util.List interface is called as a List. Eg: LinkedList, ArrayList, Vector.

3. Maps: A map stores elements in the form of key-value pairs. Eg: Hashtable, HashMap

I'll details about each type of collection in further posts... please checkout...