Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,

    Thrown by the methods of the String class to indicate that an index is either negative, or greater than the size of the string itself. You are probably using the wrong index when accessing substring of the array.

Solutions on the web

via Coderanch by Michael Smithy, 1 year ago
String index out of range: -41
via GitHub by andreisobchuck
, 1 year ago
String index out of range: -1
via Coderanch by k doshi, 1 year ago
String index out of range: -1
via GitHub by cbrouwer
, 3 months ago
String index out of range: -1
via Eclipse Bugzilla by download2003, 2 years ago
via Stack Overflow by blue-sky
, 2 years ago
String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -41 at java.lang.String.substring(Unknown Source) at UserInfo.swapHalfsForEncrypt(UserInfo.java:114) at UserInfo.encrypt(UserInfo.java:190) at UserInfoDriver.main(UserInfoDriver.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at edu.rice.cs.drjava.model.compiler.JavacCompiler.runCommand(JavacCompiler.java:272)