List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5);
int sum = numbers.stream().reduce(0, (a, b) -> a + b);
System.out.println(sum); // Output: 15
In these examples, lambda expressions are used to define the behavior passed to higher-order functions like filter(), map(), and reduce() in Java streams. The lambda expressions make the code concise and expressive, allowing developers to focus on the logic specific to their application rather than boilerplate code.