Mega Code Archive

 
Categories / Java / Collections Data Structure
 

Shuffle the elements in the array

import java.util.Arrays; import java.util.Collections; public class Main {   public static void main(String[] argv) throws Exception {     String[] array = new String[] { "a", "b", "c" };     Collections.shuffle(Arrays.asList(array));   } }