title: How to fill a 2-dimensional array in Java, adding the current row index to the previous row's integer items?
body: <p>I have a problem with an (I guess) simple Java program. I need to create a two-dimensional array (that is called a "matrix", right?) which should look like this:</p>
  
  <pre><code>1 2 3 4  5  6  7  8  9 10   (1st row)
  3 4 5 6  7  8  9 10 11 12   (2nd row)
  6 7 8 9 10 11 12 13 14 15   (3rd row)
  ...
  </code></pre>
  
  <p>As you can see, the 1st row is <code>1, 2, 3, …</code>; the 2nd row is the 1st row with the 2nd row's row index added to each element. And so on: Every row is the previous row + the current row's row number (1-based).</p>