java.lang.StringIndexOutOfBoundsException: String index out of range: 4

Coderanch | Christophe Verré | 9 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    I don't know where the problem is, can u help me?

    Coderanch | 9 years ago | Christophe Verré
    java.lang.StringIndexOutOfBoundsException: String index out of range: 4
  2. 0
    samebug tip
    Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the string.
  3. 0

    StringIndexOutOfBoundsException in a broken snippet.

    GitHub | 3 years ago | jdkessinger
    java.lang.StringIndexOutOfBoundsException: String index out of range: 4
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Primative Eksel spreadsheet JAVA

    Stack Overflow | 4 years ago | random35
    java.lang.StringIndexOutOfBoundsException: String index out of range: 4
  6. 0

    Java: for loop crashing using string charAt method

    Stack Overflow | 5 years ago | Tom Lilletveit
    java.lang.StringIndexOutOfBoundsException: String index out of range: 4

  1. poroszd 11 times, last 2 weeks ago
  2. olle.hallin 1 times, last 3 weeks ago
  3. linxiaolong 1 times, last 3 months ago
  4. jokester 1 times, last 3 months ago
  5. tyson925 1 times, last 4 months ago
12 more registered users
18 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.StringIndexOutOfBoundsException

    String index out of range: 4

    at java.lang.String.charAt()
  2. Java RT
    String.charAt
    1. java.lang.String.charAt(String.java:558)
    1 frame
  3. Unknown
    TestIndex.main
    1. TestIndex.isGoodISBN(TestIndex.java:81)
    2. TestIndex.main(TestIndex.java:27)
    2 frames