Java · Medium · ProHow does collect() work? Explain common collectors (toList, toSet, joining, groupingBy, partitioningBy).JavaJava 8+Streams