public static void shuffle ( int [ ] intArray ) { int swapPlace = - 1 ; for ( int i = 0 ; i < intArray . length ; i ++ ) { swapPlace = ( int ) ( Math . random ( ) * ( intArray . length - 1 ) ) ; XORSwap . swap ( intArray , i , swapPlace ) ; } }
Randomly shuffle an int array