The index value went past the end of the String.
Remember that index values range from 0 to the String length-1. If the String has 10 characters, the max index is 9.

In the for loop, stop the...