About 15,300,000 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, …

  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. What is the difference between the HashMap and Map objects in …

    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 …

  4. 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.) …

  5. How to preserve insertion order in HashMap? - Stack Overflow

    I'm using a HashMap. When I iterate over the map, the data is returned in (often the same) random order. But the data was inserted in a specific order, and I need to preserve the …

  6. java - Time Complexity of HashMap methods - Stack Overflow

    On an average, the time complexity of a HashMap insertion, deletion, and the search takes O (1) constant time in java, which depends on the loadfactor (number of entries present in the hash …

  7. java - How to for each the hashmap? - Stack Overflow

    HashMap<String, HashMap> selects = new HashMap<String, HashMap>(); For each Hash<String, HashMap> I need to create a ComboBox, whose items are the value (which …

  8. 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 …

  9. 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?

  10. oop - Java - Initialize a HashMap of HashMaps - Stack Overflow

    Mar 26, 2013 · 20 I am new to java and practicing by creating a simplistic NaiveBayes classifier. I am still new to object instantiation, and wonder what to do to initialize a HashMap of …