If I want to randomly select a letter between a and z, I assume I have to use the Random
class:
Random rand = new Random();
Bu
alter version of @Michael Barker
Random r = new Random();
int c = r.nextInt(26) + (byte)'a';
System.out.println((char)c);
Random r = new Random();
char c = (char) (r.nextInt(26) + 'a');
import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
...
randomAlphabetic(1).toLowerCase()
this gives you a string with single character