HashMap in Java

HashMap is one of the most used collections in Java. It is used to store key value pair. The size of HashMap increases as more key value pairs are added. Let us look at sample declaration of HashMap: HashMap<Integer,String> dummy = new HashMap<Integer,String>(); In above sample the key stored will be of type Integer and … Read more