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 -
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.
Do you know about Array?
ya i know array in general..
Mrithula,
Please go through the below link as to know about Lists:-
http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_collections_lists.htm
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 -
http://docs.oracle.com/javase/1.4.2/docs/api/java/util/List.html
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
Hi,
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!
thanks