Which interface does java.util.Hashtable implement?
By BYJU'S Exam Prep
Updated on: September 25th, 2023
Which interface does java.util.Hashtable implement?
- java.util.List
- java.util.Collection
- java.util.Map
- java.util.HashTable
Table of content
Answer C. java.util.Map
The correct answer to the question “Which interface does java.util.HashTable implement?” is java.util.Map.
Solution
A mapping between a key and a value is represented by the Java Map interface, java.util.Map. A Java Map can precisely hold pairs of keys and values. Since Map is an interface, using it necessitates creating a specific implementation of the Map interface. The following Map implementations are available through the Java Collections API:
- java.util.HashMap
- java.util.Hashtable
- java.util.EnumMap
- java.util.IdentityHashMap
- java.util.LinkedHashMap
- java.util.Properties
- java.util.TreeMap
- java.util.WeakHashMap
☛ Related Questions: