I am looking to get a random letter using something like
char ch = 'A' + randomNumber ; // randomNumber is int from 0 to 25
But that gives "loss of precision" compilation error (same if randomNumber is only a byte). I guess with Unicode the above is a gross oversimplification. But how should I do it ?
This works but seems a bit clumsy:
char ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(randomNumber);