public static int uniform(int n){
  if (n <= 0)   throw new IllegalArgumentException("Parameter N must be positive");
  return random.nextInt(n);
}

public static int uniform ( int n ) { if ( n <= 0 ) throw new IllegalArgumentException ( "Parameter N must be positive" ) ; return random . nextInt ( n ) ; }
returns a random integer uniformly in [ 0 , n ) .
