question: public final void reset ( int [ ] dims ) { if ( dims == null ) { cells = null ; } else { if ( dims . length < 1 ) { throw new IllegalArgumentException ( "Table must have at " + "least one dimension." ) ; } for ( int i = 0 ; i < dims . length ; i ++ ) { if ( dims [ i ] < 1 ) { throw new IllegalArgumentException ( "Dimension " + i + " has fewer than " + "one values: " + dims [ i ] ) ; } } this . numCells = 1 ; for ( int dim : dims ) { this . numCells *= dim ; } cells = new HashMap < > ( ) ; this . dims = new int [ dims . length ] ; System . arraycopy ( dims , 0 , this . dims , 0 , dims . length ) ; } }
target:  Resets the table, allowing a different dimensionality. All cells are reset to zero. The underlying data array is reused if possible.