Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

stream reduce

 Integer[] integers = {1, 2, 3, 4, 99, 100, 121, 1302, 199};
  final Integer sum = Arrays.stream(integers).reduce(0, Integer::sum);
    System.out.println(sum);
 
PREVIOUS NEXT
Tagged: #stream #reduce
ADD COMMENT
Topic
Name
8+6 =