SyntaxFix
Write A Post
Hire A Developer
Questions
You can achieve that concisely in Java 8:
Random random = new Random(); int max = 10; int min = 5; int totalNumber = 10; IntStream stream = random.ints(totalNumber, min, max); stream.forEach(System.out::println);