title: Only want to fill in top and bottom row of 2D array
body: <p>I only want to fill in the top and bottom row of an uninitialised array:</p>
  
  <pre><code>for (int i = 0; i &lt; ROWS; i++) {
      for (int j = 0; j &lt; COLUMNS; j++) {
          if (i == 0 || i == (ROWS - 1)) {
              values[i][j] = i;
          }
      }
  }
  </code></pre>
  
  <p>However, when I do so, it fills in all the rows in between with 0:</p>
  
  <pre><code>0000000000
  0000000000
  0000000000
  0000000000
  4444444444
  </code></pre>
  
  <p>Why is this the case?</p>