question: public IntArray resize ( IntArray array , long size ) { if ( array instanceof BigIntArray ) { return resizeInPlace ( ( BigIntArray ) array , size ) ; } else { AbstractArray arr = ( AbstractArray ) array ; final IntArray newArray = newIntArray ( size , arr . clearOnResize ) ; for ( long i = 0 , end = Math . min ( size , array . size ( ) ) ; i < end ; ++ i ) { newArray . set ( i , array . get ( i ) ) ; } array . close ( ) ; return newArray ; } }
target:  Resize the array to the exact provided size. 