Multiple choice technology programming languages

What is HashMap and Map? Answer in order

  1. Interface and Class

  2. Class and Interface

  3. interface and interface

  4. class and class

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Map is an interface in Java that defines the contract for key-value mappings, while HashMap is a concrete class implementing that interface. The question asks for HashMap first, then Map.