What are collectors in Java 8?
What are collectors in Java 8? Collectors are used to combine the result of processing on the elements of a stream. Collectors can be used to return a list or a string.