Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<String> randomList(int firstInclusive, int lastInclusive) {
- List<String> numbers = IntStream.rangeClosed(firstInclusive, lastInclusive).mapToObj(Integer::toString).collect(java.util.stream.Collectors.toList());
- java.util.Collections.shuffle(numbers, new java.security.SecureRandom());
- return numbers;
- }
Add Comment
Please, Sign In to add comment