for (int i = 0; i < array.length; ++i) {
// Do something referencing array[i]
// Do another thing referencing array[i]
...
}
In code such as this, is it actually useful to set a variable like currentValue = array[i] and then reference that instead of array[i]? I feel like the compiler would be smart enough to do something like that and render such code pointless.