Java tutorial
//package com.java2s; import java.util.Arrays; import java.util.Collections; import java.util.List; public class Main { public static String random(String src) { String[] srcList = src.split(""); List<String> list = Arrays.asList(srcList); Collections.shuffle(list); StringBuilder result = new StringBuilder(); for (String i : list) { result.append(i); } return result.toString(); } }