Courseiva

1Z0-829

Study mode — explanations shown

1

Working with Streams and Lambda Expressions

hard

Given a list of integers, a developer wants to compute the sum of squares of numbers greater than 10. The following code is written:

int sum = list.stream().filter(i -> i>10).mapToInt(i->i*i).sum();

But the sum is incorrect. What is the most likely reason?

0 of 25 answered