Showing posts with label HashMap. Show all posts
Showing posts with label HashMap. Show all posts

Difference between Hashtable, HashMap, TreeMap and LinkedHashMap

Map is one of the most important data structures and when we talk about Map all these 4 implementation classes (Hashtable, HashMap, TreeMap and LinkedHashMap) are most used. Hashtable, HashMap and LinkedHashMap are directly...

Case Insensitive HashMap

This is one of the programming interview questions which asked in recent interview. Need to implement HashMap which will take case insensitive keys. Here we should not confuse with case sensitive, since HashMap by...

Difference between HashMap and HashTable in Java

Map is one of the important Interface in Java Collections and Maps contains key and value which always stores unique keys and values. Both HashMap and Hashtable implements Map interface and works based on...

How to convert HashMap to Synchronized Map ?

In this tutorial we will see about how to convert HashMap to synchronized Map. As we know already that HashMap is not synchronized by default. Synchronize is nothing but making the HashMap to thread...

Using keySet(), entrySet() and values() methods in HashMap

Today we will see about using keySet(), value() and entrySet() methods in HashMap. Basically all these methods will be used to get the list of keys and values from HashMap. Lets see each one...