Free Salesforce Developers Tutorials >

Chapter 3 - Apex Datatypes and Operators >

Lists in APEX

Lists in APEX

What You’ll Learn


What are List in Apex? What are List in Apex?

Properties of List in ApexProperties of List in Apex

Lists In Apex

Lists are used to store data in sequence. These are the widely used collections that can store primitives, use defined objects, sObjects, Apex Objects, or other collections.

If there is a list, (‘Violet’, ‘Indigo’, ‘Blue’, ‘Yellow’, ‘Red’, ‘Purple’), below is the index and their value. 0th: ‘Violet’, 1st: ‘Indigo’, 2nd: ‘Blue’, 3rd: ‘Yellow’, 4th: ‘Red’, 5th: ‘Purple’. Here, 0th, 1st, 2nd, etc are indexes of the array. 

There are 2 main properties of lists: 

  1. It stores data in sequential order.
  2. The data which it stores is non-unique or can be duplicated. 

Hence use a list when the sequence of elements is important and where the uniqueness of the elements is not important.

Download Study Material

Get access to exclusive study material for Salesforce Certification and ace your exams!

Download Now

Our Salesforce Certification Courses

Hey there! Glad you made it through our Salesforce Developer Training for beginners. But wait! We've got some high-in-demand Salesforce courses for you to take your Salesforce skills to the next level, making you a desired professional in the Salesforce job market.

Post a Comment

Your email address will not be published. Required fields are marked *