Collection
A Java collections framework standardizes the way in that groups of objects are handled through your programs. Previously, Java gives ad hoc classes like as Dictionary, stack, vector and properties to store and manipulate groups of objects. While these classes were quite useful, they lacked a central and unifying theme. Therefore, the way which you used vector was variant from the way which you used properties, for instance. Also, the previous, ad hoc approach was not designed to be simply extensible or adaptable. A Collection are an answer to these problems.
The collections framework was designed to meet various goals. First, the framework had to be high-performance. Implementations for the fundamental collections are highly capable. You seldom, if ever, require coding one of these "data engines" manually. 2nd, the framework had to allow many types of collections to work in a same manner and with a high degree of interoperability. 3rd, extending and /or adapting a collection had to be simple. To this end, the all collections framework is designed around a set of standard interfaces. Various standard implementations of these interfaces are provided which you might use as-is. You might also implement your own collection class easier. At last, Mechanisms were added which permits the integration of standard arrays into collections framework.
Algorithms are another important part of the collection mechanism. An Algorithm operates on groups and is defined as static methods within the collections class. Thus, they are available for all collections. Each collection class require not implement its own versions. The algorithms give a standard means of manipulating collections.
Another item created by the collections framework is the Iterator interface. The Iterator gives you a standardized and general-purpose, way of accessing the elements within a collection, one at a time. Therefore, an iterator gives a means of enumerating the contents of a collection. Since each collection implements Iterator, the collections of any collection class can be accessed by the methods defined by Iterator. Therefore, along with only small changes, the code those cycles by a set could also be used to cycle by a list, for instance.
Further to collection, the framework declares various map classes and interfaces. A Map store key/value pairs. Although maps are not "collections" in the proper use of the term, they are fully integrated with collections. Within the language of the collections framework, you stored in a collection. Thus, you can procedurue the contents of a map as a collection. If you selects.
The collection mechanism was retrofitted to some of the original classes defined through java.util so in which they too could be integrated into the new system. That is important to understand that by the addition of collections has altered the architecture of several of the original utility classes; it has not caused the deprecation of any. A collection easily gives a better way of doing various things.
One last thing: if you are familiar along with c++, then you will search it helpful to know in which the java collections technology is same in sprit to the standard template library defined through c++. What c++ calls a container, java calls a collection.