Online Java Compiler By
JavaTpoint.com
import java.util.*; public class CollectionsShuffleExample1 { public static void main(String[] args) { List
list = Arrays.asList("A", "B", "C", "D"); System.out.println("List before Shuffle : "+list); Collections.shuffle(list); System.out.println("List after shuffle : "+list); } }
Output