1. Overview
In this post, We will learn about new method teeing () added in Java 12 to Collectors class. Collectors class is in package java.util.stream.Collector and it is in java.base module.2. Collectors.teeing ()
Returns a Collector that is a composite of two downstream collectors. Every element passed to the resulting collector is processed by both downstream collectors, then their results are merged using the specified merge function into the final result.