Activity Forums Salesforce Questions and Answers What is the use of size() in map in Salesforce?

  • What is the use of size() in map in Salesforce?

  • Pooja

    Member
    February 21, 2020 at 2:34 pm

    What is the use of size() in map in Salesforce?

  • Deepak

    Member
    February 21, 2020 at 2:52 pm

    Hi Pooja,

    size() Returns the number of key-value pairs in the map.

  • Kirandeep

    Member
    February 21, 2020 at 3:13 pm

    Hi Pooja,

    size() is a pre defined function in map class which returns the number of key-value pairs in the map.

  • Aditya

    Member
    February 21, 2020 at 4:26 pm

    A map is a collection of key-value pairs where each unique key maps to a single value. In map Keys can be any primitive data type like string, integer,decimal, Id while values can be a primitive, sObject, collection type or an Apex object

Viewing 1 - 4 of 4 posts

Log in to reply.

Original Post
0 of 0 posts June 2018
Now