Java HashMap Quiz

Quiz
•
Computers
•
11th Grade
•
Easy
Standards-aligned
Grit and Motivation
Used 19+ times
FREE Resource
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a HashMap in Java used for?
To store data in key-value pairs.
To perform mathematical calculations.
To manage threads.
To handle exceptions.
Tags
DOK Level 1: Recall
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true about a HashMap?
It maintains the order of insertion.
It does not allow null keys.
It is synchronized.
It allows null values.
Tags
DOK Level 1: Recall
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary difference between HashMap and Hashtable in Java?
Hashtable is synchronized, while HashMap is not.
HashMap allows null keys and values, while Hashtable does not.
Both A and B are correct.
There is no difference.
Tags
DOK Level 1: Recall
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method would you use to check if a HashMap contains a specific key?
get()
containsKey()
containsValue()
size()
Tags
DOK Level 1: Recall
5.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
How can you remove a key-value pair from a HashMap?
Tags
DOK Level 1: Recall
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if you try to store a duplicate key in a HashMap?
It will replace the old value with the new one.
It will throw an exception.
It will ignore the new value.
It will store both values.
Tags
DOK Level 1: Recall
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a method in the HashMap class?
put()
get()
insert()
remove()
Tags
DOK Level 1: Recall
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
015_Key Exchange - CompTIA Security+ SY0-701 - 1.4

Quiz
•
9th Grade - University
15 questions
Year 12 Programming

Quiz
•
11th - 12th Grade
10 questions
Perintah Join SQL

Quiz
•
11th Grade - University
10 questions
PERINTAH SQL 01

Quiz
•
10th Grade - University
13 questions
Dojo - Type Inference

Quiz
•
1st - 12th Grade
10 questions
MySQL revision tour

Quiz
•
11th - 12th Grade
10 questions
Hashing, Digital Signatures and BlockChain Practice Questions

Quiz
•
11th Grade
10 questions
DDL (Data Definition Language) II

Quiz
•
11th Grade
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade
Discover more resources for Computers
20 questions
Lab Safety and Lab Equipment

Quiz
•
9th - 12th Grade
7 questions
EAHS PBIS Lesson- Bathroom

Lesson
•
9th - 12th Grade
57 questions
How well do YOU know Neuwirth?

Quiz
•
9th - 12th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade
6 questions
Secondary Safety Quiz

Lesson
•
9th - 12th Grade
4 questions
Study Skills

Lesson
•
5th - 12th Grade
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
20 questions
Points, Lines & Planes

Quiz
•
9th - 11th Grade