// bad way to generate random ints import java.util.Random; // ... static Random wheel = new Random(); // ... int m = (int)( Math.random() * 10.0d ); // not recommended!!