randInt static method

int randInt(
  1. int low,
  2. int high
)

Implementation

static int randInt(int low, int high) {
  return low + Math.floor(Math.random() * (high - low + 1));
}