An Introduction to java.util.Hashtable Class | Baeldung

2. When to use HashtableLet’s say we have a dictionary, where each word has its definition. Also, we need to get, insert and remove words from the dictionary quickly.Hence, Hashtable (or HashMap) makes sense. Words will be the keys in the Hashtable, as they are supposed to be unique. Definitions, on the other hand, will be the values.

Source: An Introduction to java.util.Hashtable Class | Baeldung

Leave a Reply

Your email address will not be published. Required fields are marked *