12 Common uses of Java Streams
Java Streams API was introduced in Java 8. Its aim is to provide a less verbose and concise way to carry out common operations on collections of objects.
Although it can be hard to get used to, the Java Streams API is very powerful and can be used to...
blog.abhinavpandey.dev6 min read
Shai Almog
Yak Barber, duck whisperer, hunter of bugs, feeder of dogs, heap climber, stack explorer and rider of shells
Nicely written!
While I generally like streams and use them. I feel there's a case of "over use". A lot of times the code isn't less verbose. It also forces us to use objects which is sometimes slower than primitives (until we get Valhalla at least).
Also some chaining makes the code less readable. Worse, it's usually harder to debug... The specialized debugging tools are "nice" but they aren't nearly as powerful/simple as debugging a loop.
I agree that
parallelStreamshouldn't be in a common use case. But it probably should be mentioned in the advantages.