SyntaxFix
Write A Post
Hire A Developer
Questions
Try:
int sum = lst.stream().filter(o -> o.field > 10).mapToInt(o -> o.field).sum();