Here you can find the source of shuffleInPlace(E[] elems, Random rand)
public static <E> void shuffleInPlace(E[] elems, Random rand)
//package com.java2s; import java.util.*; public class Main { public static <E> void shuffleInPlace(E[] elems, Random rand) { for (int j = elems.length - 1; j > 0; j--) { int randIndex = rand.nextInt(j + 1); E tmp = elems[randIndex];/*from w w w. j a v a 2 s . c om*/ elems[randIndex] = elems[j]; elems[j] = tmp; } } }