Activity › Forums › Salesforce® Discussions › In Salesforce How can you declare List/Map/Set in Apex ? Salesforce® Discussions In Salesforce How can you declare List/Map/Set in Apex ? Posted by Arun on January 21, 2020 at 2:42 PM In Salesforce How can you declare List/Map/Set in Apex ? Anuj replied 6 years, 4 months ago 2 Members · 1 Reply 1 Reply Anuj Member January 21, 2020 at 2:57 PM Hi Arun, In Salesforce Apex List ,Set and Map can be used to store data in bulk , for unique data we used Set for example Id, and for duplicate we use List and for Map is used for Key,Value pair where key is unique and value can be multiple Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me