how to shuffle string java
public static String shuffleString(String string)
{
List<String> letters = Arrays.asList(string.split(""));
Collections.shuffle(letters);
String shuffled = "";
for (String letter : letters) {
shuffled += letter;
}
return shuffled;
}