generateRandomNumber method

int generateRandomNumber(
  1. int length
)

Implementation

int generateRandomNumber(int length) {
  int randomNumber = Random().nextInt(length);
  return randomNumber;
}