An accumulator is a variable initialized before a loop and then updated on each iteration to compute a result: sum, counter, maximum, concatenation. Initialization matters: 0 for a sum, 1 for a product, and the first value or Integer.MIN_VALUE for a maximum.
Example
int somme = 0;
for (int x : valeurs) {
somme += x;
}