public int nextInt(int min,int max){
  if (min >= max) {
    throw new IllegalArgumentException(String.format("bad range: [%d, %d)",min,max));
  }
  int range=max - min;
  int ret=nextInt();
  ret=Math.abs(ret) % range;
  return ret + min;
}

public int nextInt ( int min , int max ) { if ( min >= max ) { throw new IllegalArgumentException ( String . format ( "bad range: [%d, %d)" , min , max ) ) ; } int range = max - min ; int ret = nextInt ( ) ; ret = Math . abs ( ret ) % range ; return ret + min ; }
returns the next random number in the sequence , bounded by the given bounds .
