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?
Run the code through a profiler to answer the question for your usecase.
The answer to this will probably be JVM specific. The Oracle HotSpot JVM is going to perform differently than OpenJDK or IBM's JDK. Timings will depend on how the JVM optimizes the byte code, what it decides to compile while it is running. Server vs client mode will probably make a difference too.
So aim for readability. Optimize after profiling and determining that section of code is the problem.