randomInt static method

int randomInt(
  1. int max
)

Implementation

static int randomInt(int max) {
  return math.Random().nextInt(max);
}