Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java get random char from alphabet

/* import java.util.Random; */
Random r = new Random();

char c = (char)(r.nextInt(26) + 'a');		// lowercase
char c = (char)(r.nextInt(26) + 'A');		// uppercase
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #random #char #alphabet
ADD COMMENT
Topic
Name
9+6 =