sum = 0;

assigns the value 0 to the sum variable.