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.

Learn it properly, with a checkpoint 1.15 String Manipulation

Related terms

Was this page helpful?

No names are ever shown, and every public comment is checked by us first. Please do not include personal details. To get a reply, email [email protected].

↑ Top

Enlarged view of the selected figure