SIGN IN SIGN UP

Login to your account

Username or Email *
Password *
Remember Me
Apex Beginner Progress | ( Lessons)
%

Lesson: 01 Lists


List can contain any number of records of primitive, collections, sObjects, user defined and built in Apex type. This is one of the most important type of collection and also, it has some system methods which have been tailored specifically to use with List. List index always starts with 0.

 
A list should be declared with the keyword 'List'.
List<string> Fruits = new List<string>();
System.debug('Fruits: '+Fruits);

or

String[] Fruits = new List<String>();
 

A list with it values can be declared as the following.

Prev You need to login to have access to the quizzes. Next

Mastered by 170 users.

Apex Beginner

A. Apex Fundamentals (23 lessons)
B. Apex Collections (6 lessons)
Go to top