Day 3: Let’s collect data using Stream API

On day 2, you learned that Stream API can help you work with collections in a declarative manner. We looked at the collect method, which is a terminal operation that collects the result set of a stream pipeline in a List. The collect method is a reduction operation that reduces a stream to a collection. The collect method takes a Collector which let us implement functionalities like group by, partitioning, very easily. Continue reading “Day 3: Let’s collect data using Stream API”