Java 8 Stream distinct operation will return a stream consisting of the distinct elements of the Stream. The distinct() operation is an intermediate operation, which means it return a new stream. So distinct() creates a new Stream that contains