+ 1

index out of bounds

what does index out of bounds mean in the output and how can i fix it ?

26th Feb 2018, 7:43 PM
Farah Aldeijy
Farah Aldeijy - avatar
1 Answer
+ 2
Which code? Could you please provide a link to it so we can look for errors? But if it's an ArrayIndexOutOfBoundsException you are trying to access a value not inside the array. For example: x is an integer-Array with the length of 5 x[10] is too large, that causes an compile-time-exception. Runtime-Exception here would be for example: for(int i = 49; i >= 0; i--) { x[i] = i; }
26th Feb 2018, 8:35 PM
D B
D B - avatar