Update Example2.java
This commit is contained in:
parent
0e23f2e682
commit
8e973888ad
|
@ -26,7 +26,7 @@ public class Example2 {
|
|||
|
||||
long numberOf65PlusCustomers = customers.stream()
|
||||
.flatMap(c -> c.map(Stream::of)
|
||||
.orElseGet(Stream::empty))
|
||||
.orElseGet(Stream::empty))
|
||||
.mapToInt(Customer::getAge)
|
||||
.filter(c -> c > 65)
|
||||
.count();
|
||||
|
|
Loading…
Reference in New Issue