public static int [ ] flip ( int [ ] src , int [ ] dest , final int start , final int length ) { if ( dest == null || dest . length < length ) dest = new int [ length ] ; int srcIndex = start + length ; for ( int i = 0 ; i < length ; i ++ ) { dest [ i ] = src [ -- srcIndex ] ; } return dest ; }
Reverses an integer array