code: public static int getRandomInteger(int min, int max) {
  		Random r = new Random();
  		return r.nextInt(max - min + 1) + min;
  	}
docs: Returns a random integer between MIN inclusive and MAX inclusive.
  
  @param min
  value inclusive
  @param max
  value inclusive
  @return an int between MIN inclusive and MAX exclusive.