Shuffle.java Source code

Java tutorial

Introduction

Here is the source code for Shuffle.java

Source

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class Shuffle {
    public static void main(String args[]) {
        String[] strArray = new String[] { "Java", "Source", "And", "and", "Support", "java2s" };

        List l = Arrays.asList(strArray);
        Collections.shuffle(l);
        System.out.println(l);
    }
}