random static method

int random(
  1. int from,
  2. int to
)

Implementation

static int random(int from, int to){
  var random = Random();
  return random.nextInt((to+1) - from) + from;
}