PPT Slide
- Array indices begin at 0, not at 1
- So, length is one greater than iMAX_INDEX
- Thus, an error if you do:
int[ ] iGradeArray = new int[10];
for (i=1; i <= iGradeArray.length; i++)
- But... you have indices 0..9
- So: it misses the 1st element
(which is at index 0) it tries to go past 10th element