Below method will generate random Alphanumeric string of specified length using Java -
pX03qt8
public static String randomString(int length) {
String strRandom = RandomStringUtils.randomAlphanumeric(length);
return strRandom;
}
OUTPUT:pX03qt8
No comments:
Post a Comment