shuffle characters in String
807603Jan 8 2008 — edited Jan 8 2008Hy,I'll start with a program i'm dealing with.
I need to shuffle the characters in a String besides the first and last character in some text file for example.
Well i started like this
i put the word in some String
then i make char[] c = s.toCharArray();
then make a list.
List l = Arrays.asList(c);
Collections.shuffle(l);
Of course this doesn't work,i suppose because the list can't take char array,but in doc it is Object[]..My question is:if it is there anyway to shuffle the characters of a String with shuffle method in Collections?