randomInt function

int randomInt(
  1. int max
)

return random int number , 0 - max

max values between 1 and (1<<32) inclusive.

Implementation

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