About 52 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. What is the best way to use a HashMap in C++? [closed]

    A hash_map is an older, unstandardized version of what for standardization purposes is called an unordered_map (originally in TR1, and included in the standard since C++11). As the name …

  5. Difference between HashSet and HashMap? - Stack Overflow

    The Hashset internally uses HashMap. If you see the internal implementation the values inserted in HashSet are stored as keys in the HashMap and the value is a Dummy object of Object …

  6. ¿Cómo iterar a través de un HashMap? - Stack Overflow en español

    Jan 13, 2016 · Tengo una estructura en HashMap y necesito iterarla a través de un for. Como puedo hacer esta iteración? Mi código: import java.util.HashMap; import java.util.Map; public …

  7. Is a Java hashmap search really O (1)? - Stack Overflow

    For a hash table resolving collisions with chaining (like Java's hashmap) this is technically O (1+α) with a good hash function, where α is the table's load factor. Still constant as long as the …

  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. Difference between a HashMap and a dictionary ADT

    Sep 17, 2015 · Note that there is a difference between the "Map" abstract data type and the Map Java interface. As mentioned in other answers, the legacy Dictionary class does not …

  10. Difference between HashMap and ArrayList in Java?

    Mar 7, 2010 · In Java, ArrayList and HashMap are used as collections. But I couldn't understand in which situations we should use ArrayList and which times to use HashMap. What is the …