Last index is length minus one.
A4
Practice more AP Computer Science A questions with full explanations