public static int randRange(int min,int max){
  int mod=max - min;
  double val=Math.ceil(Math.random() * 1000000) % mod;
  return (int)val + min;
}

public static int randRange ( int min , int max ) { int mod = max - min ; double val = Math . ceil ( Math . random ( ) * 1000000 ) % mod ; return ( int ) val + min ; }
simple function for getting a random range .
