// Generate random integers 0 .. 10 import java.util.Random; // ... // To get exactly the same results each run // seed the generator with a repeatable value. // Create the Random object only once. Random wheel = new Random( 149L ); ... for ( int i=0; i<100; i++ ) { // generate another random integer 0 ..10 int m = wheel.nextInt( 11 ); out.println( m ); }