# Map

say it: **“MAP”** **/mæp/**

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?category=java&level=4)

Updated: November 17, 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
