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

Coderanch | Pat Steele | 2 years 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

    A very basic code problem

    Coderanch | 2 years ago | Pat Steele
    java.lang.StringIndexOutOfBoundsException: String index out of range: 98098

    Root Cause Analysis

    1. java.lang.StringIndexOutOfBoundsException

      String index out of range: 98098

      at java.lang.String.substring()
    2. Java RT
      Scanner.nextInt
      1. java.lang.String.substring(String.java:1950)
      2. java.util.Scanner.buildIntegerPatternString(Scanner.java:423)
      3. java.util.Scanner.integerPattern(Scanner.java:443)
      4. java.util.Scanner.nextInt(Scanner.java:2117)
      4 frames
    3. Unknown
      easydoesit.main
      1. easydoesit.main(easydoesit.java:16)
      1 frame