A list is an ordered collection of typed primitives, sObjects, user-defined objects, Apex objects or collections that are distinguished by their indices. For example, the following table is a visual representation of a list of Strings: Index 0 Index 1 Index 2 Index 3 Index 4 Index 5 'Red' 'Orange' 'Yellow' 'Green' 'Blue' 'Purple' The index position of the first element in a list is always 0. Because lists can contain any collection, they can be nested within one another and become multidimensional. For example, you can have a list of lists of sets of Integers. A list can contain up to four levels of nested collections inside it.
Read more in here though bob explained it beautifully but here is official link
This code is accessing the final element in a array (list).
Arrays are index origin 0, so if the size of the array is 10, the last element is actually at position 9 (because the first element is at position 0).
All Answers
This code is accessing the final element in a array (list).
Arrays are index origin 0, so if the size of the array is 10, the last element is actually at position 9 (because the first element is at position 0).
Index 0 Index 1 Index 2 Index 3 Index 4 Index 5
'Red' 'Orange' 'Yellow' 'Green' 'Blue' 'Purple'
The index position of the first element in a list is always 0.
Because lists can contain any collection, they can be nested within one another and become multidimensional. For example, you can have a list of lists of sets of Integers. A list can contain up to four levels of nested collections inside it.
Read more in here though bob explained it beautifully but here is official link
http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_collections_lists.htm