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
kagago mokagago mo 

any can explain this code to? thanks im new..sorry

 Map<String,String> resultMap = new Map<String,String>();
Niraj Kr SinghNiraj Kr Singh
Hi
 
"Map" is type of collection which hold the data in Key and Value pair.
Where you can hold any primitive/non-primitive kind of data. but for "key" prefer to use primitive data type

Map<String, String> resultMap = new Map<String, String>();

Here:
Map : is a collection type.
String : is primitive data type.
resultMap : is a variable to refer map for get/put data.
new : is an instance creating operator.

For more details plz visit this link:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_collections_maps.htm

Thanks
Niraj