Your 'for' continuation expression pretty much guarantees trying to access past the end of the array. Array indexes start at 0 and end at length - 1, so the continuation condition should normally be...