code: public static int randomInt(int lo, int hi) {
          return (Math.abs(random.nextInt()) % (hi - lo + 1)) + lo;
      }
docs: Generates a random integer between the specified values.
  
  
  @param lo the lower bound for the generated integer.
  @param hi the upper bound for the generated integer.
  @return a random integer between <code>lo</code> and <code>hi</code>.