Answers for "how to generate random chars and numbers"

PHP
0

A random character from a string of characters:

String chars = "abcxyz";
Random rnd = new Random();
char c = chars.charAt(rnd.nextInt(chars.length()));
Posted by: Guest on December-19-2020

Code answers related to "how to generate random chars and numbers"

Browse Popular Code Answers by Language