I need, using an already defined set of 2-4 letters, to create a string that is completely randomized. How to take letters, combine them into one line, randomize the position of each character, and then turn this large line into two lines with an arbitrary size (but> = 2). Thanks for helping everyone.
My code so far:
//shuffles letters ArrayList arrayList = new ArrayList(); arrayList.add(fromFirst); arrayList.add(fromLast); arrayList.add(fromCity); arrayList.add(fromSong); Collections.shuffle(arrayList);
But I found that it shuffles strings, not individual letters. It also, being an array, has brackets that won't be found in a regular letter, and I want it to look like a random assortment of letters
source share