To get a random number use (int)( Math.random() * 20) // generates a random integer from 0 to 19