by random3 · 7y ago · 0 comments
``` widgets.stream() .filter(b -> b.getColor() == RED) .mapToInt(b -> b.getWeight()) .sum(); ``` https://docs.oracle.com/javase/8/docs/api/java/util/stream/p...
They aren't specific to Java. In fact they require features such as lambdas that made them less practical until Java 8.
No comments yet.