java.lang.StringIndexOutOfBoundsException

String index out of range: 0

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.

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

Solutions on the web6140

  • via Coderanch by Juan Bonilla, 9 months ago
    String index out of range: 0
  • via Coderanch by duhit Choudhary, 11 months ago
    String index out of range: 0
  • via Coderanch by Don Nguyen, 9 months ago
    String index out of range: 0
  • Stack trace

    • java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:646) at LookAndSaySequence.main(LookAndSaySequence.java:11)

    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

    Unknown user
    2 times, 1 year ago
    Once, 5 months ago
    32257 times, 7 months ago
    4 times, 10 months ago
    Unknown user
    Once, 11 months ago
    34 more bugmates