Map

A collection that associates unique keys with values.

What is Map in Java?

Map — A collection that associates unique keys with values.

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

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

Level: Freelancer · More Java terms at this level

Updated

In other subjects