java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Oracle Community | 807595 | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    what is wrong with this code?

    Oracle Community | 1 decade ago | 807595
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  2. 0

    Merging 2 strings

    Stack Overflow | 1 year ago | Clement
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  3. 0

    CS 111: Common Java Errors

    bu.edu | 2 months ago
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Using BigDecimal in number factorisation

    Stack Overflow | 2 years ago | Emma
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2
  6. 0

    Substring in Java - length up to a value

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

  1. filpgame 2 times, last 3 weeks ago
  2. gamebusterz 1 times, last 3 weeks ago
  3. jokester 3 times, last 1 month ago
  4. richard77 2 times, last 2 months ago
  5. MoYapro 1 times, last 2 months ago
21 more registered users
58 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: -1

    at java.lang.String.substring()
  2. Java RT
    String.substring
    1. java.lang.String.substring(String.java:1525)
    1 frame
  3. Unknown
    Test.main
    1. Test.main(Test.java:9)
    1 frame