Activity Forums Salesforce® Discussions Difference between List,Set And Map in Salesforce

  • PRANAV

    Member
    January 10, 2017 at 10:52 am

    Hi Vikas,

    A list is an ordered collection of elements that are distinguished by their indices. List elements can be of any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types.

    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.

    A set is an unordered collection of elements that do not contain any duplicates. Set elements can be of any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types.

    Yes, you can use List of list but it depends on scenario to scenario which suits best for the functionality.

    Hope this helps you.

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos