约 53 个结果
在新选项卡中打开链接
  1. What is a hash map in programming and where can it be used

    2010年4月7日 · 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. 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 …

  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

    2009年7月1日 · 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. ¿Cómo iterar a través de un HashMap? - Stack Overflow en español

    2016年1月13日 · 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 class Testeo { …

  7. Difference between a HashMap and a dictionary ADT

    2015年9月17日 · 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 implement the Map …

  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 includes for …

  9. collections - How HashMap works internally - Stack Overflow

    2014年8月6日 · HashMap in Java is a widely used data structure, which allows key-value pairs to be stored and retrieved in constant time. In this article, we will look into how the get () and put () …

  10. Newest 'hashmap' Questions - Stack Overflow

    I have a HashMap whose key type holds a heap allocation. I don't know if the HashMap already contains a particular key, and I would like to insert a new entry if the key doesn't already exist.