title: change array logic in java
body: <p>How can I change the following code so it prints out: </p>
  
  <blockquote>
    <p>123<br>
    123<br>
    123</p>
  </blockquote>
  
  <p>instead? </p>
  
  <pre><code>public class A4SXYY {
      public static void main(String[] args) {
          int[][] a2 = new int[3][3];
          for (int i = 0; i &lt; a2.length; i++) {
              for (int j = 0; j &lt; a2[i].length; j++) {
                  a2[i][j] = i + 1;
                  System.out.print(" " + a2[i][j]);
              }
              System.out.println("");
          }
      }
  }
  </code></pre>