code: public Matrix times(Matrix B)
      {
          if (B.m != n)
          {
              throw new IllegalArgumentException("Matrix inner dimensions must agree.");
          }
          Matrix X = new Matrix(m, B.n);
          double[][] C = X.getArray();
          double[] Bcolj = new double[n];
          for (int j = 0; j < B.n; j++)
          {
              for (int k = 0; k < n; k++)
              {
                  Bcolj[k] = B.A[k][j];
              }
              for (int i = 0; i < m; i++)
              {
                  double[] Arowi = A[i];
                  double s = 0;
                  for (int k = 0; k < n; k++)
                  {
                      s += Arowi[k] * Bcolj[k];
                  }
                  C[i][j] = s;
              }
          }
          return X;
      }
docs: Linear algebraic matrix multiplication, A * B
  
  @param B another matrix
  @return Matrix product, A * B
  @throws IllegalArgumentException Matrix inner dimensions must agree.