Data Structures, Algorithms, & Applications in Java
Chapter 2, Exercise 21

The second for loop is entered rows * cols times. Each time, one addition is performed. The total number of adds is therefore, rows * cols.