How do I shuffle the characters in a string (e.g. hello could be ehlol or lleoh or …). I don’t want to use the Collections.shuffle(...) method, is there anything simpler?
How do I shuffle the characters in a string (e.g. hello could be ehlol
Share
I dont know anything simpler. But you can use the Math.rand() functionality to generate a random number within the range of the character’s length without replace and that would give you a shuffled output