Shuffling the Elements of a List or Array: use Collections.shuffle() to randomly reorder the elements in a list
import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { public static void main(String[] argv) throws Exception { List list = new ArrayList(); Collections.shuffle(list); } }