Image for post
Image for post

To be 100% clear this post is not about Java Garbage collector neither Java getting your money :D. Java 8 introduced Collectors, but still most engineers just barely know them. Collectors are pretty useful if you are working with Streams. According to the book Effective Java 3rd edition, you should not abuse from Streams but unfortunately thats, not the reality. However, if you still have fit you stream code in a few lines of code Collectors can be handy and save you some additional transformation steps. Most people when they know collectors they tend just to use the toList() collector but there is much more to explore. Today I recorded a video showing some other collectors’ features with you guys. I hope you like it. Let’s get started.

The Video

The Code


Originally published at on November 20, 2020.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store