HashMap’s methods are not synchronized . HashTable is more or less obsolete and people writing new code should avoid using a HashTable. In a HashMap, keys are always unique. i.e., there cannot be 2 entries with the same key.
HashMap’s methods are not synchronized . HashTable is more or less obsolete and people writing new code should avoid using a HashTable. In a HashMap, keys are always unique. i.e., there cannot be 2 entries with the same key.