java.lang.StringIndexOutOfBoundsException

String index out of range: 6


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 web4553

Solution icon of bugzilla
via Eclipse Bugzilla by eclipse, 2 months ago
String index out of range: - 6

Solution icon of bugzilla
String index out of range: 6

Solution icon of github
via GitHub by matiuri
, 7 months ago
String index out of range: 6

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

Solution icon of googlegroups
via Google Groups by Dan Armbrust, 7 months ago
String index out of range: -6

Solution icon of sonatype
via Sonatype JIRA by Michael Rumpf, 1 year ago
String index out of range: -6

Solution icon of springsource
via SpringSource Issue Tracker by Martin Lippert (c), 1 year ago
String index out of range: -6

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

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

Stack trace

  • java.lang.StringIndexOutOfBoundsException: String index out of range: 6 at java.lang.String.charAt(String.java:658) at Freq.processLine(Freq.java:23) at Freq.main(Freq.java:12)

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
Once, 1 month ago
35 more bugmates