question: public static String generateRandomString ( int length ) { String AB = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" ; Random rnd = new Random ( ) ; StringBuilder sb = new StringBuilder ( length ) ; for ( int i = 0 ; i < length ; i ++ ) sb . append ( AB . charAt ( rnd . nextInt ( AB . length ( ) ) ) ) ; return sb . toString ( ) ; }
target:  generate random string with given length