0
What is the difference between the HashMap and the array?
2 Réponses
0
HashMap uses key, values to store data, whereas array is collection of similar data type and you use index to access the data.
0
Though both are used to store objects but they are completely different on their implementation, working and usage. The main difference between ArrayList and HashMap is that ArrayList is index based data-structure backed by an array while HashMap is map data structure which works on hashing to retrieve stored values.
Difference between Hashtable and Dictionary in C# ... Hashtable is loosely typed (non-generic) collection, this means it stores key-value pairs of any data types. Dictionary is generic collection. So it can store key-value pairs of specific data types.