I need a few lines of Java code that run a command x percent of the time at random.
psuedocode:
boolean x = true 10% of cases. if(x){ System.out.p
You could always generate a random number (by default it is between 0 and 1 I believe) and check if it is <= .1, again this is not uniformly random....