java.lang.StringIndexOutOfBoundsException

String index out of range: 3

Samebug tips1

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.


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web1226

  • via Unknown by barry richard,
  • via Unknown by Jeff Verdegan,
  • Stack trace

    • java.lang.StringIndexOutOfBoundsException: String index out of range: 3 at java.lang.String.charAt(String.java:658) at Example.main(Example.java:12)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    harshgharshg
    2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    sriharshakiransriharshakiran
    Once,
    rprp
    Once,
    zsambokizsamboki
    Once,
    34 more bugmates