What is faster in Java. Accessing an array index directly multiple times, or saving the value of the array index to a new variable and use this for following compution?
I would recommend second approach, simply because it is a lot more readable and helps a lot the maintainability.
Performance gains, except if your array is huge, are really really small.
Readability gains, on the other hand, are always good to take.