function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Crazy panda 6Crazy panda 6 

Can I get scenarios on Collections (list,set,map) or any website ??? Where I can go through it

RakeshRakesh (Salesforce Developers) 
HI Crazy Panda,

Learn more about Collections (list, set, map) using the below Apex Developer Guide 
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_collections.htm


Happy learning!
Hope this helps you!

Thanks,
Rakesh
 
Ajay K DubediAjay K Dubedi
Hii Crazy,

List,Set,Map are called collections in Apex:

List : A list is an ordered collection
so use list when you want to identify list element based on Index Number. List (can contain Duplicates)
EX: List<account>

Set: A set is an unordered collection of primitives or sObjects that do not contain any duplicate elements.
So, use set if you want to make sure that your collection should not contain Duplicates.
EX: Set<account>

Map: A map is a collection of key-value pairs where each unique key maps to a single value. Keys can be any primitive data type, while values can be a primitive, sObject, collection type or an Apex object. For example, the following table represents a map of countries and currencies


for Collection(List,Map,Set) follow this :- https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_collections.htm

Apex Developer Guide :-https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dev_guide.htm

Please select this answer as best if you find it helpful.

Thank You,
Ajay Dubedi
raj_sfdccraj_sfdcc
Hi,

Below post can provide you whole idea of collections with hands on practice examples .

Collections In Salesforce (https://salessforcehacks.blogspot.com/2020/01/collections-in-salesforce-list-set-map.html)