code: private void checkIndices(int row, int col) {
          if (row < 0 || row >= rows)
              throw new ArrayIndexOutOfBoundsException("row: " + row);
          else if (col < 0 || col >= cols)
              throw new ArrayIndexOutOfBoundsException("column: " + col);
      }
docs: Check that the indices of a requested cell are within bounds.
  
  @param row The row of the cell to check.
  @param col The column of the cell to check.
  
  @throws ArrayIndexOutOfBoundsException if