code: public E[][] addMatrix(E[][] matrix1, E[][] matrix2)
      {
          // Check bounds of the two matrices
          if ((matrix1.length != matrix2.length) ||
              (matrix1[0].length != matrix2[0].length))
          {
              throw new SecretShareException("The matrices do not have the same size");
          }
  
          E[][] result = //(E[][])new Number[matrix1.length][matrix1[0].length];
                  create(matrix1.length, matrix1[0].length);
  
          // Perform addition
          for (int i = 0; i < result.length; i++)
          {
              for (int j = 0; j < result[i].length; j++)
              {
                  result[i][j] = add(matrix1[i][j], matrix2[i][j]);
              }
          }
  
          return result;
      }
docs: Add two matrices.
  @param matrix1 first
  @param matrix2 second
  @return maxtrix 1 + 1