So let\'s say you want to generate a random number, but you want it to be UNDER a specified amount. Is this possible?
Random rand = new Random(); int randInt = rand.nextInt( 16 ); //Generates a number in [0, 1, .., 15]
Documentation at: http://docs.oracle.com/javase/7/docs/api/java/util/Random.html#nextInt(int)