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


Samebug tips2

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.


7 months ago
Expert 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.


,
via oracle.com by Unknown author

Solutions on the web1271

Solution icon of stackoverflow
via Stack Overflow by T. Dog
, 8 months ago
String index out of range: 6

Solution icon of stackoverflow
String index out of range: 6

Solution icon of coderanch
String index out of range: 6

Solution icon of github
String index out of range: 6

Solution icon of stackoverflow
String index out of range: 6

Solution icon of coderanch
via Coderanch by micahel dunn, 1 year ago
String index out of range: 6

Solution icon of coderanch
via Coderanch by Carey Brown, 1 year ago
String index out of range: 6

Solution icon of stackoverflow
via Stack Overflow by Gökhan Nas
, 1 year ago
String index out of range: 6

Solution icon of stackoverflow
via Stack Overflow by Ryan Seipp
, 1 year ago
String index out of range: 6

Solution icon of bugzilla
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

3 times, 1 week ago
2 times, 2 weeks ago
Once, 3 weeks ago
Once, 3 weeks ago
Once, 1 month ago
41 more bugmates