Answers for "random array index java"

1

java get random index from array

private int getRandomIndex(int arrayLength) {
  Random r = new Random();
  return r.nextInt(arrayLength);
}
Posted by: Guest on May-23-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language