Collection framework is an architecture that is used to manipulate and represent collection objects.
| Methods | Description |
|---|
| public boolean isEmpty() | Check that the collection is empty or not. |
| public boolean add(Object obj) | Insert an element in collection. |
| public boolean addAll(Collection c) | Insert a specified collection in the given collection. |
| public boolean remove(Object obj) | Delete an element from the collection. |
| public boolean removeAll(Collection c) | It is used to delete all elements in the collection. |
| public int size() | Count the number of elements in collection. |
| public void clear() | Removes the all the elements in collection. |
| public boolean contains(Object obj) | Search an element in the collection. |
| public boolean containsAll(Collection c) | Search a specified collection in the given collection. |
| public boolean retainAll(Collection c) | Retain only common elements in the target collection that are also present in specified collection. |
| public boolean equals(Object obj) | Match the given collection with the specified collection. |
| public Iterator iterator() | Iterate the collection elements. |
| public int hashCode() | Find the hashcode value of the collection element. |
| public Object[] toArray() | Convert collection object into array object. |
| public Object[] toArray(Object[] obj) | Convert collection into given array. |