code: public static int random(int min, int max) {
          if (min < 0 || max < 0) {
              throw new RuntimeException(
                      "illegal argment, min and max must great then zero.");
          }
          if (min > max) {
              int t = max;
              max = min;
              min = t;
          } else if (min == max) {
              return min;
          }
  
          Random random = new Random();
          return random.nextInt(max) % (max - min + 1) + min;
  
      }
docs: [min,max]
  
  @param min
  @param max
  @return