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 ) ; }
Check that the indices of a requested cell are within bounds .