Activity Forums Salesforce® Discussions How do I use a map in Apex class?

  • Anuj

    Member
    September 7, 2020 at 1:41 pm

    You Can use Map in Apex following ways:

    1. Creating a Map: Map<Key,Value> variablename=new Map<Key,Value>(); ...
    2. Different Methods in Map:
    3. put(key, value): It returns the value with given key in the map. ...
    4. clear(): It removes all the key-value mapping pairs from the map.
    5. get(key): ...
    6. keySet(): ...
    7. values(): ...
    8. size():

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos