title: The entered digits are not organized in a matrix properly
body: <p>I wrote some code but the output is not exactly what I want. The result is okay, but the first two matrices are not. So, when I input numbers in the first and second 2x2 matrix it does not organize properly in the array.</p>
  
  <p><strong>My code is:</strong></p>
  
  <pre><code>public static void main(String[] args) {
      int i, j;
  
  
      Scanner sc = new Scanner(System.in);
      System.out.println("Enter 4 digits in the first matrix:");
  
      int arrey1[][] = new int[2][2];
      int arrey2[][] = new int[2][2];
      int sum[][] = new int[2][2];
  
      for (i = 0; i &lt; arre1.length; i++) {
          for (j = 0; j &lt; arrey1.length; j++) {
              arrey1[i][j] = sc.nextInt();
          }
      }
      System.out.println("Enter 4 digits in the second matrix:");
      for (i = 0; i &lt; 2; i++) {
          for (j = 0; j &lt; 2; j++) {
              arrey2[i][j] = sc.nextInt();
          }
      }
      for (i = 0; i &lt; 2; i++) {
          for (j = 0; j &lt; 2; j++) {
              sum[i][j] = arrey1[i][j] + arrey2[i][j];
          }
      }
      System.out.println("The result is:");
      for (i = 0; i &lt; 2; i++) {
          for (j = 0; j &lt; 2; j++) {
              System.out.print(sum[i][j] + " ");
          }
          System.out.println();
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>I would need this outcome:</strong> </p>
  
  <pre><code>Enter 4 digits in the first matrix:
  1 2
  3 4
  Enter 4 digits in the second matrix:
  5 -1
  3 -4
  The result:
  6 1
  6 0
  </code></pre>
  
  <p>Thank you very much the help is advance.</p>