How to handle java.lang StringIndexOutOfBoundsException: String index ...
When someone tries to access the characters with limits exceeding the range of actual string value, java.lang.StringIndexOutOfBoundsException: String index out of range occurs. Example : In the following example, StringIndexOutOfBoundsExceptionExample.java, we shall try to access the characters out of range, using subString method.