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