question: void resize ( int nsize ) { Object narray = allocateArray ( nsize ) ; System . arraycopy ( array , 0 , narray , 0 , Math . min ( nsize , getArrayLength ( ) ) ) ; array = narray ; }
target:  resize the underlying storage array to the given new size