if((val1 < 0)||(val1 > totalRows)||(val1 > totalCols))
if((val1 < 0)||(val1 >= totalRows)||(val1 >= totalCols))
    public void swapRowsAndCols(int val1, int val2) {	int totalRows = this.getRows();	int totalCols = this.getCols();	if((val1 < 0)||(val1 > totalRows)||(val1 > totalCols))	    throw new IllegalArgumentException("invalid parameter val1 = " + val1);	if((val2 < 0)||(val2 > totalRows)||(val2 > totalCols))	    throw new IllegalArgumentException("invalid parameter val2 = " + val2);	swapRows(val1,val2);	swapCols(val1,val2);    }