Assuming that random is a SecureRandom object, explain in detail the stream pipeline:
random.ints(1000000, 1, 3)
.boxed()
.collect(Collectors.groupingBy(Function.identity(),
Collectors.counting()))
.forEach((side, frequency) ->
System.out.printf("%-6d%d%n", side, frequency));
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.