randomInt function

int randomInt(
  1. int max
)

Implementation

int randomInt(int max) {
  var r = Random();
  return r.nextInt(max);
}