hamburger

Which interface does java.util.Hashtable implement?

By BYJU'S Exam Prep

Updated on: September 25th, 2023

Which interface does java.util.Hashtable implement?

  1. java.util.List
  2. java.util.Collection
  3. java.util.Map
  4. java.util.HashTable

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:

Our Apps Playstore
POPULAR EXAMS
SSC and Bank
Other Exams
GradeStack Learning Pvt. Ltd.Windsor IT Park, Tower - A, 2nd Floor, Sector 125, Noida, Uttar Pradesh 201303 help@byjusexamprep.com
Home Practice Test Series Premium