You Can use Map in Apex following ways:
- Creating a Map: Map<Key,Value> variablename=new Map<Key,Value>(); …
- Different Methods in Map:
- put(key, value): It returns the value with given key in the map. …
- clear(): It removes all the key-value mapping pairs from the map.
- get(key): …
- keySet(): …
- values(): …
- size():