Stream pipelining in java 8:- Stream operations return stream itself so that their result can be pipelined. These operations are called intermediate operations and their function is to take input, process them, and return output to the target. The collect() method is a terminal operation which is normally present at the end of the pipelining operation to mark the end of the stream.