Activity › Forums › Salesforce® Discussions › What is the working of Map in Salesforce?

  • Aman

    Member
    July 13, 2017 at 2:29 PM

    Hello Shariq,

    A map is a collection of key-value pairs where each unique key maps to a single value. Keys and values can be any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types.

    To declare a map, use the Map keyword followed by the data types of the key and the value within <> characters. For example:

    Map<String, String> country_currencies = new Map<String, String>();

    Map<ID, Set<String>> m = new Map<ID, Set<String>>();

  • [adinserter block='9']
  • shariq

    Member
    July 14, 2017 at 1:56 PM

    Thanks Aman, It helps a lot.

  • Parul

    Member
    September 16, 2018 at 5:06 AM

    A map is a collection of key-value pairs where each unique key maps to a single value. Keys and values can be any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types.

     

     

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Free 5 Day Salesforce Challenge!

Video in

To access the signup form head over to www.talentstacker.com/Salesforce TalentStacker Podcast Salesforce Episode: https://talentstacker.libsyn.com/how-to-earn-60k-100k-a-year-within-6-months-without-a-college-degree-say-what-salesforce-career-development-path-with-bradley-rice Do you already have a job as a Salesforce Professional and…