How do I create an empty Stream in Java?

sdgfsdh picture sdgfsdh · Feb 15, 2017 · Viewed 27.7k times · Source

In C# I would use Enumerable.Empty(), but how do I create an empty Stream in Java?

Answer

Eugene picture Eugene · Feb 15, 2017

As simple as this: Stream.empty()