Java for-loop going past exit condition

I have a for-loop that is running through an array of size 512 (index range 0 – 511). However, when i == 512, it continues into the loop anyways throwing an ArrayIndexOutOfBounds exception. The screenshot below shows my code when I run it in debug mode with the stop condition set to i == 512.

enter image description here

Anyone have any idea why this loop is continuing to cycle even after the exit condition is met?