Explain the different scenarios wherein you need to use different types of collections i.e list, set and map?



Explain the different scenarios wherein you need to use different types of collections i.e list, set..

Answer / Naeem Akhatar

Lists are used when you want to maintain the order of elements. Sets are used when you want to ensure unique values without any particular order. Maps are used to store key-value pairs where keys must be unique.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

How can we deploy components to production org ? : salesforce lightning component

1 Answers  


Can we create master detail relationship between two standard objects?

1 Answers  


What are groups in sfdc and what is their use in salesforce?

1 Answers  


How to identify if a class is a test class? : salesforce crm

1 Answers  


What are the different ways to Share a record?

1 Answers   Cognizant,


What is wrapper class in apex salesforce ?

1 Answers  


How can we fetch top 5 opportunity according to the amount?

1 Answers  


Explain the static methods and variables in salesforce?

1 Answers  


What the concurrent request limit is and why it exists in salesforce?

1 Answers  


What is the use force:hasrecordID?

1 Answers  


What is the maximum size of the pdf generated on visualforce attribute renderas ?

1 Answers  


How to get the userid of all the currently logged in users using apex code?

1 Answers  


Categories