---
title: "What is the difference between HashMap and Hashtable?"  
description: "What is the difference between HashMap and Hashtable?"  
author: "Anonymous User"  
published: 2015-05-12  
updated: 2020-09-20  
canonical: https://www.mindstick.com/interview/2519/what-is-the-difference-between-hashmap-and-hashtable  
category: "java"  
tags: ["java", "collection"]  
reading_time: 1 minute  

---

# What is the difference between HashMap and Hashtable?

**HashMap** 1)HashMap is not synchronized. 2)HashMap can contain one null key and multiple null values. \
**Hashtable**1)Hashtable is synchronized.2)Hashtable cannot contain any null key or null value.

## Answers

### Answer by Anonymous User

**HashMap** 1)HashMap is not synchronized. 2)HashMap can contain one null key and multiple null values. \
**Hashtable**1)Hashtable is synchronized.2)Hashtable cannot contain any null key or null value.


---

Original Source: https://www.mindstick.com/interview/2519/what-is-the-difference-between-hashmap-and-hashtable

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
