Map

Maps keys to values.

Operations

  • Setting the value for a key

  • Checking a key's existence

Getting the keys and values

The map offers a few methods to acquire the keys and values all together.

To get all the keys:

map.keySet();

To get all the values:

map.values();

To get both the keys and the values:

map.entrySet();

Last updated