Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Java

Idiom #331 Clear map

Remove all entries from the map m.

Explain if other references to the same map now see an empty map as well.

m.clear();

All references to this map now see an empty map.
m.Clear();

All references see it's empty.

New implementation...
< >
programming-idioms.org