int number1 = 0; // first integer to add (initialized to 0)int number2 = 0; // second integer to add (initialized to 0)int sum = 0; // sum of number1 and number2 (initialized to 0)
are declarations. The identifiers
sum are the names of variables. These declarations specify that the variables
sum are data of type int, meaning that these variables will hold integer values. The declarations also initialize each of these variables to
Error-Prevention Tip 2.1
Although it’s not always necessary to initialize every variable explicitly, doing ...