Guest User

Untitled

a guest
Dec 12th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. List<String> randomList(int firstInclusive, int lastInclusive) {
  2. List<String> numbers = IntStream.rangeClosed(firstInclusive, lastInclusive).mapToObj(Integer::toString).collect(java.util.stream.Collectors.toList());
  3. java.util.Collections.shuffle(numbers, new java.security.SecureRandom());
  4. return numbers;
  5. }
Add Comment
Please, Sign In to add comment