+ Start a Discussion

what is list ?



iam a  newbie..can anyone explain me " what is List  with an example? " and "Where should i use this ?"


Thanks in advance..


Do you know about Array?


ya i know array in general..




Please go through the below link as to know about Lists:-





ohk, that's great.
Lists are just like arrays, but the main deference between them is that lists are dynamic in their size. Means we can add any number of elements to the list whenever we require but with array - we have an fix number of elements.
If you are familiar with Java collection, have a look here -


here you will get all information about list and its functions.

After this write some programs then you will get what you want.



List are just like array collection of homogeneous object.


like list of string or lost of integer. the mose common use of list is in return of SOQl .


Capgemini developer




   In common, List is nothing but list of items.


     Eg: "List of works to be done in office"  - 1.sending mail, 2.organising a meeting, 3.to complete requirement docs,. etc. All these are list of items to be takencare in office. 


  As like the same, let me consider Office as a custom object and we have to take all list of items(fields) in single memory space. This can be implemented by LIST function.


general syntax:(using office as custom object):


List <office__C> items = new list<office__C>();


Here 'Items' is the memory space for the values to be assigned.


Think this may be a down to earth explanation. If you want still more explanation let us know.


Have a Nice start in Apex!