// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class DoubleAndShuffle {
    public static String[] das(String[] a) {
        List<String> lst = new ArrayList<String>();
        Collections.addAll(lst, a);
        Collections.addAll(lst, a);
        Collections.shuffle(lst);
        return lst.toArray(new String[lst.size()]);
    }
    public static void main(String[] args) {
        String[] a = { "A", "B", "C", "D" };
        String[] a2 = das(a);
        for(String s : a2) {
            System.out.println(s);
        }
    }
}
