Skip to content

Instantly share code, notes, and snippets.

@ShigeoTejima
Created August 17, 2015 01:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShigeoTejima/9d6e4e814c4380e299cd to your computer and use it in GitHub Desktop.
Save ShigeoTejima/9d6e4e814c4380e299cd to your computer and use it in GitHub Desktop.
memo - get random-string using commons-lang3
// append to pom.xml
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
// using example
String randomString = RandomStringUtils.randomAlphanumeric(8);
// => length=8, Upper and Lower Alphabet and Numeric
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment