How to check if a Java 8 Stream is empty?

This may be sufficient in many cases

stream.findAny().isPresent()

Leave a Comment