Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java get random

// Thread safe random number generator.

import java.util.concurrent.ThreadLocalRandom;



// Generate random integers  
int val = ThreadLocalRandom.current().nextInt();  

// Print random int
System.out.println("Random Integer: " + val); 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #random
ADD COMMENT
Topic
Name
9+3 =