Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

int array to map java

Map<Integer, Long> map = Arrays
        .stream(nums)
        .boxed() // this
        .collect(Collectors.groupingBy(e -> e, Collectors.counting()));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #int #array #map #java
ADD COMMENT
Topic
Name
2+3 =