math.random() value code example Example: math.random int random = (int) (Math.random()*(max-min+1)+min);