java.lang.StringIndexOutOfBoundsException

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.


rafael

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

  • Battleships - guys please help me out!
    via by Mark Spritzler,
  • How to add enter to this string array?
    via Stack Overflow by raymond
    ,
  • error
    via by 807595,
  • Web Services Tutorial with Apache CXF | Ben McCann
    via by Unknown author,
  • bug? discrepancy with (get ...)
    via by jon,
    • java.lang.StringIndexOutOfBoundsException: String ind ex out of range: 0 at java.lang.String.charAt(String.java:558) at BattleShips.askUser(BattleShips.java:319) at BattleShipsDriver.main(BattleShipsDriver.java:21)

    Users with the same issue

    poroszd
    12 times, last one,
    olle.hallin
    1 times, last one,
    linxiaolong
    1 times, last one,
    jokester
    1 times, last one,
    tyson925
    1 times, last one,
    30 more bugmates