INT -Array, um Java abzubilden
Map<Integer, Long> map = Arrays
.stream(nums)
.boxed() // this
.collect(Collectors.groupingBy(e -> e, Collectors.counting()));
Friendly Ferret