AP® Computer Science A glossary
StringIndexOutOfBoundsException
Course: AP® Computer Science A Shows up in: Unit 1: Using Objects and Methods
The exception thrown when a String method uses an index outside the allowed range.
Appears in the course and exam description (CED): 1.15.B.1
Character indices run from 0 to length() - 1. The to argument of substring may equal length(), because it stops before to; anything larger throws the exception.