16.8 Collectors A collector encapsulates the functions required for performing reduction: the supplier, the accumulator, the combiner, and the finisher.…