public static String randomString ( int length ) { StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < length ; i ++ ) { int index = ( int ) random ( 0 , ALL_CHAR . length ( ) - 1 ) ; sb . append ( ALL_CHAR . charAt ( index ) ) ; } return sb . toString ( ) ; }
Returns a random string .