LongStream empty()
returns an empty sequential LongStream.
empty
has the following syntax.
static LongStream empty()
The following example shows how to use empty
.
import java.util.stream.LongStream; public class Main { public static void main(String[] args) { LongStream b = LongStream.empty(); System.out.println(b.count()); } }
The code above generates the following result.