# Map

A collection that associates unique keys with values.

## What is **Map** in Java?

**Map** — A collection that associates unique keys with values.

```java
import java.util.HashMap;
import java.util.Map;

class PriceList {
    Map<String, Integer> prices = new HashMap<>();
}
```

Level: Freelancer · [More Java terms at this level](https://www.ask-codey.com/glossary/subjects/java/freelancer)

Updated: September 28, 2026

## In other subjects

- [Map in JavaScript](https://www.ask-codey.com/glossary/map-javascript-2)

Source: https://www.ask-codey.com/glossary/map-java
