NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
Arrays are 0 based,, so a [5] array has length 5 and indexes 0-4
Your loop
for(int i=0; i<=personArray.length; i++){
will attempt to access indexes 0-5, and will fail on the last one with an IndexOutOfBounds (5)
JamesCherrill
Posting Genius
6,371 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073