The array depicted above has 7 elements.
Each element in an array holds a distinct value.
In the figure, the number above each element shows that element's index.
Elements are always referenced by their indices. In Java, the first element is always index 0.
This is an important point, so I will repeat it! The first element is always index 0.
Given this zero-based numbering, the index of the last element in the array is always the array's length minus one.
So in the array pictured above, the last element would have index 6 because 7 minus 1 equals 6.
Real Life Example
Unlike Java, the real world usually uses one based arrays. When we ask for the file in front of all the others, we ask for the first, not the zeroeth file.