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:
Comments
write a comment