Index out of bounds? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Index out of bounds?

I'm getting an ArrayIndexOutOfBoundsException error... There are 4 elements and it fails at x[0] and x[3]. I do not understand... If I change the numbers inside the array then it does not fail. Just check out the code and it will be easier to understand :). Any help highly appreciated! https://code.sololearn.com/cQBpM2Jeor0o

1st Jan 2018, 12:24 PM
EricMcDerrick
EricMcDerrick - avatar
1 Answer
- 1
Just found out.... Thanks to the guys answering before :P
1st Jan 2018, 12:34 PM
EricMcDerrick
EricMcDerrick - avatar