Answers for "using java stream filter to find the sum of property"

0

using java stream filter to find the sum of property

int sum = lst.stream().filter(o -> o.getField() > 10).mapToInt(o -> o.getField()).sum();
Posted by: Guest on August-05-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language