title: How do I change an object to an array in this scenario?
body: <p>I understand the issue of matrixMultiply() runs into an issue because m1 is not an array, but rather an object. There are definitely a lot more errors in the code right now, but at the moment I'm focusing on fixing this method before continuing. There is probably a simple solution, but it isn't hitting me right now.</p>
  
  <pre><code>public class APMatrix {
  
      KeyboardReader reader = new KeyboardReader();
      private int[][] matrix;
  
      public APMatrix(int R, int C, boolean enter) {
  
          matrix = new int[R][C];
  
          if (enter) {
              for (int r = 0; r &lt; matrix.length; r++) {
                  for (int c = 0; c &lt; matrix[r].length; c++) {
                      matrix[r][c] = reader.readInt("What value do you want in row " + (r + 1) + ", col " + (c + 1) + "? ");
                  }
              }
          }
      }
  
      public APMatrix(int[][] copyMe) {
          for (int r = 0; r &lt; copyMe.length; r++) {
              for (int c = 0; c &lt; copyMe[r].length; c++) {
                  matrix[r][c] = copyMe[r][c];
              }
          }
      }
  
      public int getRows() {
          return matrix.length;
      }
  
      public int getColumns() {
          return matrix[0].length;
      }
  
      public APMatrix matrixMultiply(APMatrix m1) {
          if (this[0].length == m1.length) {
              int[][] m2 = new int[this.length][m1[0].length];
  
              for (int outer = 0; outer &lt; this.length; outer++) {
                  for (int inner = 0; inner &lt; m1[0].length; inner++) {
                      for (int all = 0; all &lt; m1.length; all++) {
                          m2[outer][inner] += m1[all][inner];
                      }
                  }
              }
              return m2;
          } else {
              return null;
          }
      }
  
      public String toString() {
          String retobj = "wow";
          return retobj;
      }
  }
  </code></pre>