I am trying to get into Java 8 and get my head around threads and lambda to solve various problems and am stuck on this particular one, which I usually use forEach and store values ββin Map for solution.
How could you write code to get the expected list using new features in Java 8?
List<Integer> voterA = Arrays.asList(1,2,3,4,5); List<Integer> voterB = Arrays.asList(1,2,3,4,5); List<List<Integer>> votes = Arrays.asList(voterA, voterB);
source share