java.lang.StringIndexOutOfBoundsException

String index out of range: 29


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 web4530

Solution icon of github
String index out of range: -29

Solution icon of oraclecommunity
String index out of range: 29

Solution icon of stackoverflow
String index out of range: 29

Solution icon of coderanch
via Coderanch by Olivier Legat, 10 months ago
String index out of range: 29

Solution icon of stackoverflow
String index out of range: 29

Solution icon of oraclecommunity
via Oracle Community by 807599, 8 months ago
String index out of range:

Solution icon of oraclecommunity
via Oracle Community by 3004, 1 month ago
String index out of range

Solution icon of stackoverflow
String index out of range

Solution icon of oraclecommunity
via Oracle Community by 807607, 1 year ago
String index out of range:

Solution icon of coderanch
via Coderanch by virga, 8 months ago
String index out of range: -1

Stack trace

  • java.lang.StringIndexOutOfBoundsException: String index out of range: 29 at java.lang.String.charAt(String.java:686) at EncryptDecrypt.encrypt(EncryptDecrypt.java:14) at EncryptDecrypt.main(EncryptDecrypt.java:28)

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

Samebug visitor profile picture
Unknown user
Once, 2 weeks ago
Once, 1 month ago
Once, 1 month ago
14 times, 1 month ago
4 times, 1 month ago
35 more bugmates