Monday, January 18, 2016

Generate Random Alphanumeric String using Java

Below method will generate random Alphanumeric string of specified length using Java -

public static String randomString(int length) {
String strRandom = RandomStringUtils.randomAlphanumeric(length);
return strRandom;
}


OUTPUT:
pX03qt8

No comments:

Post a Comment