Hello,
i’m new here and a beginner in Java. Also english is not my native language, but i hope u can understand my problem.
I have a problem with my code and can’t solve it myself. I get this error:
“java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 6”
I know what this error means but i can’t find the array that causing this problem. I only can identify in which void the error occurs. But this void has over 3.000 lines of code and several arrays with 6 positions. Also this error does not come every time. I can’t reproduce this error, because i don’t know exactly what went wrong.
I do a lot of VBA and there the code line in which the error occurs get’s highlighted so you know exactly which array throws the exception. In processing it seems i don’t get the correct line and i don’t see the array.
I tried the try{} catch (excpetion)} this doesn’t help me.
How can i identify the array or the code line which throws the exception?
Is this even possible? The code is pretty messy it’s not good coded and i will recode the whole thing when i’m done with it. But for now, i need to know where the error comes from.
I hope you understand and can help me