
Want to become a Java Developer but don't know what Java Collection Framework is? Don’t worry reading this article will make you familiar with the topic helping you in becoming a master of Java.
| Methods | Why they are Used |
| Add() | Used to insert the specific element into the collection. |
| AddAll() | Used to insert all the elements into the specific collection. |
| Remove() | It is used to delete a specific element into the collection. |
| RemoveAll() | It is used to delete all the elements of a specific collection. |
| Clear() | Removes all the elements from the collection |
| Iterator() | It is used to return an iterator which is used to access the element of the collection. |
| Size() | It is used to see the size of a collection. |
| Methods | Their Uses |
| put(K, V) | It is used to insert the association of the Key (K) and the value (V) into the map. |
| putAll() | It is used to insert all the entries from one specified map to another |
| PutIfAbsent(K, V) | It is used to insert the association if the key (K) is not associated with the value (V) |
| get(K) | It is used to give a specified value associated with key (K), if there is no value it will return null. |
| ContainsKey(K) | It is used to check if the specified key is present i the map or not. |
| ContainsValue(V) | It is used to check if the specified value is present in the map or not. |
| remove(K,V) | It is used to delete the entry from the map that has key (K) and value (V) associated with it. |
| Keyset() | It is used to return the set of all the keys present in the map |
| Values() | It is used to return the set of all the values associate with the map. |