Java-Collection-Framework

This project is maintained by SHRADHA-YEWALE

Collection Framework in Java

Recently, I have started reading the Java Collection framework and I will be writing series of articles from my learnings from scratch.

What is the Collection framework: 

The collection framework in java provides many interfaces and classes which gives the programmer access to prepackaged data structures as well as algorithms for manipulating them.

Collection interface and Map interface are two main interfaces of java collection framework.

Collection Interface :

**Collection interface hierarchy**

One of the advantages of the Collection framework is that it provides consistent API → [The classes that implements common interfaces share the common methods] e.g. Since then classes ArrayList, LinkedList, Vector, and Stack implements common interface List, They share all the methods of List, Collection and Iterable interface.

Map Interface :

Map interface provides interface and classes which represents a mapping between key and value.

**Map interface hierarchy**

Every interface and class in the Collection interface as well as in the Map interface have some significance. Let’s see their significance in form of a flow diagram. The following flow diagram depicts the significance of which class or interface to be used based on the respective requirements.

**Flow diagram for Map and Collection interface**