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
anil Kumaranil Kumar 

List, Set and Map

Hi,

List, Set and Map are this classes are interfaces in Selasforce?

Regards,
Anil Kumar
Lalit Sharma CybageLalit Sharma Cybage
Anil

List Set and Map and Collection type of classes instead of Interface.

Please go through the below link for the details of how to use them.

https://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_collections.htm

Lalit Sharma
Head CoE - CRM
Cybage Software Pvt. Ltd
 
Nirmal ChristopherNirmal Christopher
List, Set, Maps are the members of collections framework in Apex.

Properties of Lists
---------------------------
List-
1) Acts like an Array
2) Store Individual ordered collection of Elements.
3) Can be lists(Collections) of Sobjects, Integegr, String and other data types.
Eg. List<sobject>Identifier=new list<sobject>(); //defining a new list
       Identifier.add(1,2,3); 

Set

1)Store unordered collection of elements and it doesn't allow duplicates.
2)Acts like an array but cannot insert dupicate data.
3)It can aso be a collection of primitive data types,S Objects and Other Data Types.

https://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_collections_sets.htm

Maps
1) Holds the element in Key Value pairs.
2)Call the key you call the appropriate element.
3)Map Keys acts like primary key in the database if you are familiar.
4)Unlike Java there is no concept hash maps etcc..
5) Can hold Sobjects and other primitive data tyes.
https://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_collections_maps.htm