public static int randomRangeInt(int min,int max){
  return (int)(Math.random() < 0.5 ? ((1 - Math.random()) * (max - min) + min) : (Math.random() * (max - min) + min));
}

public static int randomRangeInt ( int min , int max ) { return ( int ) ( Math . random ( ) < 0.5 ? ( ( 1 - Math . random ( ) ) * ( max - min ) + min ) : ( Math . random ( ) * ( max - min ) + min ) ) ; }
returns a random integer between the value min and the value max .
