Shorter answer:
- A Java array got a field called length, which keeps the number of indexed elements it contains.
- Its 1st index, a.K.a the head element, is 0.
- Its last index, a.K.a. the tail element, is length - 1.
- We specify the index we wish to access via the square brackets
[]
operator:
https://Processing.org/reference/arrayaccess.html - For further details: http://www.TutorialsPoint.com/java/java_arrays.htm