The line
sum = 0;
assigns the value 0 to the
sum
variable.
Unlike objects, memory for variables are allocated by virtue of their declaration.