randomInt function

int randomInt(
  1. int max
)

随机数(0-max)小于max

Implementation

int randomInt(int max) => Random().nextInt(max);