Lists:: A list is an ordered collection of elements that are distinguished by their indices. List elements can be of any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types.
Maps A map is a collection of key-value pairs where each unique key maps to a single value. Keys and values can be any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types.
Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.
Lists:: A list is an ordered collection of elements that are distinguished by their indices. List elements can be of any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types.
Maps
A map is a collection of key-value pairs where each unique key maps to a single value. Keys and values can be any data type—primitive types, collections, sObjects, user-defined types, and built-in Apex types.
Please refer the below link for reference.
- https://developer.salesforce.com/forums/?id=906F0000000DDpWIAW
- http://www.sfdc99.com/2013/09/28/data-collections-lists-sets-and-maps/
hope it helps.Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.
Thanks
Rahul Kumar
List can hold more then sinlge record .you can use list to bulkify your code.
Map-Map can help you when you are dealing with parent-child executions .
Please find the below post which can give you clear idea about list and map with real time examples .
List Vs Map (https://salessforcehacks.blogspot.com/2020/01/collections-in-salesforce-list-set-map.html)