public static String randomString ( int length ) { // CAUSE: If-Else Statements Should Use Braces if ( length < 1 ) { throw new IllegalArgumentException ( String . format ( "length < 1: %s" , length ) ) ; } char [ ] buf = new char [ length ] ; return nextString ( buf ) ; }
Generates a random alphanumeric string