About 53 results
Open links in new tab
  1. What is a hash map in programming and where can it be used

    Apr 7, 2010 · Hashmap is used for storing data in key value pairs. We can use a hashmap for storing objects in a application and use it further in the same application for storing, updating, deleting values.

  2. collections - What are the differences between a HashMap and a ...

    What are the differences between a HashMap and a Hashtable in Java? Which is more efficient for non-threaded applications?

  3. Difference between HashMap, LinkedHashMap and TreeMap

    What is the difference between HashMap, LinkedHashMap and TreeMap in Java? I don't see any difference in the output as all the three has keySet and values. Also, what are Hashtables? …

  4. Difference between HashSet and HashMap? - Stack Overflow

    Apart from the fact that HashSet does not allow duplicate values, what is the difference between HashMap and HashSet in their implementation? It's a little bit vague because both use hash tables to...

  5. java - Iterate through a HashMap - Stack Overflow

    Jul 1, 2009 · Since all maps in Java implement the Map interface, the following techniques will work for any map implementation (HashMap, TreeMap, LinkedHashMap, Hashtable, etc.) Method #1: …

  6. How to directly initialize a HashMap (in a literal way)?

    Map<String, String> myMap = new HashMap<String, String>() {{ put("a", "b"); put("c", "d"); }}; However, the anonymous subclass might introduce unwanted behavior in some cases. This includes for …

  7. Java: how to convert HashMap<String, Object> to array

    Jul 7, 2009 · I need to convert a HashMap<String, Object> to an array; could anyone show me how it's done?

  8. What is the difference between the HashMap and Map objects in Java?

    64 Map is an interface that HashMap implements. The difference is that in the second implementation your reference to the HashMap will only allow the use of functions defined in the Map interface, while …

  9. HashMap with multiple values under the same key - Stack Overflow

    HashMap<String, String> servicesNameHashmap = new HashMap<String, String>(); in your for loop. It will have same effect like same key and multiple values.

  10. How to get values and keys from HashMap? - Stack Overflow

    Apr 27, 2013 · Convert Hashmap to MapSet to get set of entries in Map with entryset() method.: Set st = map.entrySet(); Get the iterator of this set: Iterator it = st.iterator(); Get Map.Entry from the iterator: …