-2

What would be the best way to generate 50,000 unique random values which are put into an ArrayList in Java?

yellowhat5
  • 129
  • 1
  • 1
  • 6

1 Answers1

2

Fill the ArrayList with 50,000 sequential values and call Collections.shuffle(list).

Kayaman
  • 72,141
  • 5
  • 83
  • 121