public static String getRandomString(int length)
{
String randomStr = UUID.randomUUID().toString();
while(randomStr.length() < length) {
randomStr += UUID.randomUUID().toString();
}
return randomStr.substring(0, length);
}
↧
Answer by Vin Ferothas for How to generate a random alpha-numeric string?
↧