Answers for "creating a random string of 5 char"

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 "creating a random string of 5 char"

Browse Popular Code Answers by Language