Does Java have any functionality to generate random characters or strings? Or must one simply pick a random integer and convert that integer's ascii code to a character?
To generate a random char in a-z:
Random r = new Random(); char c = (char)(r.nextInt(26) + 'a');
1.4m articles
1.4m replys
5 comments
57.0k users