Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

exception in thread "main" java.lang.indexoutofboundsexception: index 1 out of bounds for length 1

 0 means you are trying to access index 0 which is invalid, which in turn means the array is empty.
 String[] names = new String[0]; // thats the problem
 String[] names = new String[somelength];//this is true usage
 
PREVIOUS NEXT
Tagged: #exception #thread #index #bounds #length
ADD COMMENT
Topic
Name
9+2 =