When you only need the values and not the index, Java offers a shorter syntax called the enhanced for loop (also known as for-each):
int[] scores = {90, 85, 78, 92, 88};
for (int score : scores) {
System.out.println(score);
}
The variable score takes on each element's value in order, from index to the last. You do not manage a counter, and there is no risk of an off-by-one error.
The trade-off: you cannot modify the array during iteration because you have no index. Assigning a new value to score only changes the local copy, not the array itself. If you need to update elements in place, use the standard for loop instead.