16.1 Introduction to Streams A stream allows aggregate operations to be performed on a sequence of elements. An aggregate operation…